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):
47
47
super (PBSPlugin , self ).__init__ (template , ** kwargs )
48
48
49
49
def _is_pending (self , taskid ):
50
- result = CommandLine ('qstat {}' .format (taskid ),
50
+ result = CommandLine ('qstat -f {}' .format (taskid ),
51
51
environ = dict (os .environ ),
52
52
terminal_output = 'allatonce' ,
53
53
resource_monitor = False ,
54
54
ignore_exception = True ).run ()
55
+
56
+ stdout = result .runtime .stdout
55
57
stderr = result .runtime .stderr
56
- errmsg = 'Unknown Job Id' # %s' % taskid
58
+ errmsg = 'Unknown Job Id'
57
59
success = 'Job has finished'
58
- if success in e : # Fix for my PBS
60
+ if ( success in stderr ) or ( 'job_state = C' in stdout ):
59
61
return False
60
62
else :
61
- return errmsg not in e
63
+ return errmsg not in stderr
62
64
63
65
def _submit_batchtask (self , scriptfile , node ):
64
66
cmd = CommandLine ('qsub' , environ = dict (os .environ ),
You can’t perform that action at this time.
0 commit comments