File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -175,9 +175,18 @@ wait_for_jobs(
175
175
function job_status (jobid:: PBSJobID )
176
176
status_str = readchomp (` qstat -f $jobid -x -F dsv` )
177
177
job_state_match = match (r" job_state=([^|]+)" , status_str)
178
- status = first (job_state_match. captures)
179
178
substate_match = match (r" substate=([^|]+)" , status_str)
180
- substate_number = parse (Int, (first (substate_match. captures)))
179
+ status = if isnothing (job_state_match)
180
+ @warn " Job status for $jobid not found. Assumed to be running, check by running `qstat -f $jobid -x -F dsv`"
181
+ " Q"
182
+ else
183
+ first (job_state_match. captures)
184
+ end
185
+
186
+ substate_number =
187
+ isnothing (substate_match) ? 0 :
188
+ parse (Int, first (substate_match. captures))
189
+
181
190
status_dict = Dict (" Q" => :RUNNING , " F" => :COMPLETED )
182
191
status_symbol = get (status_dict, status, :RUNNING )
183
192
# Check for failure in the substate number
You can’t perform that action at this time.
0 commit comments