Skip to content

Commit

Permalink
Shows job script in submitted mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Peng committed Dec 4, 2019
1 parent 43b6b3d commit 1d01a31
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/sos/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,15 @@ def show_file(task, exts):
except Exception:
print('Binary file')

if s not in ('pending', 'submitted', 'running'):
if s == 'running':
show_file(t, '.sh')
show_file(t, '.job_id')
show_file(t, ['.sosout', '.out'])
show_file(t, ['.soserr', '.err'])
elif s == 'submitted':
show_file(t, '.sh')
show_file(t, '.job_id')
elif s != 'pending':
if tf.has_shell():
print('\nexecution script:\n================\n' + tf.shell)
else:
Expand All @@ -1562,11 +1570,7 @@ def show_file(task, exts):
print('\nstandard error:\n================\n' + tf.stderr)
else:
show_file(t, ['.soserr', '.err'])
elif s == 'running':
show_file(t, '.sh')
show_file(t, '.job_id')
show_file(t, ['.sosout', '.out'])
show_file(t, ['.soserr', '.err'])


# remove jobs that are older than 1 month
if to_be_removed:
Expand Down

0 comments on commit 1d01a31

Please sign in to comment.