Skip to content

Commit 620df94

Browse files
committed
Fixed the error when no response from the server is obtained.
1 parent bfe9aeb commit 620df94

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Modules/Cluster.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,13 @@ def check_job_finished(self, job_id, verbose = True):
997997
if len(lines):
998998
for l in lines:
999999
data = l.strip().split()
1000-
if data[0] == job_id:
1000+
if len(data) == 0:
1001+
if verbose:
1002+
now = datetime.datetime.now()
1003+
sys.stderr.write("{}/{}/{} - {}:{}:{} | job {}: No response from the server \n".format(now.year, now.month, now.day, now.hour, now.minute, now.second, job_id))
1004+
sys.stderr.flush()
1005+
return False
1006+
elif data[0] == job_id:
10011007
if verbose:
10021008
now = datetime.datetime.now()
10031009
sys.stderr.write("{}/{}/{} - {}:{}:{} | job {} still running\n".format(now.year, now.month, now.day, now.hour, now.minute, now.second, job_id))

0 commit comments

Comments
 (0)