File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -276,11 +276,14 @@ def print_dictionary(self):
276
276
277
277
def is_job_pending (self , task_id ):
278
278
task_id = int (task_id ) # Ensure that it is an integer
279
- self ._run_qstat ("checking job pending status {0}" .format (task_id ), False )
280
279
# Check if the task is in the dictionary first (before running qstat)
281
280
if task_id in self ._task_dictionary :
282
281
# Trust the cache, only False if state='zombie'
283
282
job_is_pending = self ._task_dictionary [task_id ].is_job_state_pending ()
283
+ # Double check pending jobs in case of change (since we don't check at the beginning)
284
+ if job_is_pending :
285
+ self ._run_qstat ("checking job pending status {0}" .format (task_id ), False )
286
+ job_is_pending = self ._task_dictionary [task_id ].is_job_state_pending ()
284
287
else :
285
288
self ._run_qstat ("checking job pending status {0}" .format (task_id ), True )
286
289
if task_id in self ._task_dictionary :
You can’t perform that action at this time.
0 commit comments