Spaces:
Running
Running
Commit
·
11a16aa
1
Parent(s):
c50532c
Check `return_code` is `None` during job running
Browse files- run_jobs.py +1 -1
run_jobs.py
CHANGED
|
@@ -161,7 +161,7 @@ def pop_job_from_pipe():
|
|
| 161 |
with open(f"./tmp/{task_id}.log", "a") as log_file:
|
| 162 |
return_code = None
|
| 163 |
p = subprocess.Popen(command, stdout=log_file, stderr=subprocess.STDOUT)
|
| 164 |
-
while pipe.current and
|
| 165 |
# Wait for finishing
|
| 166 |
try:
|
| 167 |
return_code = p.wait(timeout=1)
|
|
|
|
| 161 |
with open(f"./tmp/{task_id}.log", "a") as log_file:
|
| 162 |
return_code = None
|
| 163 |
p = subprocess.Popen(command, stdout=log_file, stderr=subprocess.STDOUT)
|
| 164 |
+
while pipe.current and return_code is None:
|
| 165 |
# Wait for finishing
|
| 166 |
try:
|
| 167 |
return_code = p.wait(timeout=1)
|