File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -47,18 +47,20 @@ def __init__(self, **kwargs):
4747 super (PBSPlugin , self ).__init__ (template , ** kwargs )
4848
4949 def _is_pending (self , taskid ):
50- result = CommandLine ('qstat {}' .format (taskid ),
50+ result = CommandLine ('qstat -f {}' .format (taskid ),
5151 environ = dict (os .environ ),
5252 terminal_output = 'allatonce' ,
5353 resource_monitor = False ,
5454 ignore_exception = True ).run ()
55+
56+ stdout = result .runtime .stdout
5557 stderr = result .runtime .stderr
56- errmsg = 'Unknown Job Id' # %s' % taskid
58+ errmsg = 'Unknown Job Id'
5759 success = 'Job has finished'
58- if success in e : # Fix for my PBS
60+ if ( success in stderr ) or ( 'job_state = C' in stdout ):
5961 return False
6062 else :
61- return errmsg not in e
63+ return errmsg not in stderr
6264
6365 def _submit_batchtask (self , scriptfile , node ):
6466 cmd = CommandLine ('qsub' , environ = dict (os .environ ),
You can’t perform that action at this time.
0 commit comments