Skip to content

Commit

Permalink
Merge pull request #152 from ericaltendorf/report_access_denied
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky authored Apr 28, 2021
2 parents 06de974 + 7787ab5 commit c068ab7
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions src/plotman/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,22 @@ def status_report(jobs, width, height=None, tmp_prefix='', dst_prefix=''):
# Regular row
else:
try:
row = [j.plot_id[:8],
j.k,
abbr_path(j.tmpdir, tmp_prefix),
abbr_path(j.dstdir, dst_prefix),
plot_util.time_format(j.get_time_wall()),
phase_str(j.progress()),
plot_util.human_format(j.get_tmp_usage(), 0),
j.proc.pid,
j.get_run_status(),
plot_util.human_format(j.get_mem_usage(), 1),
plot_util.time_format(j.get_time_user()),
plot_util.time_format(j.get_time_sys()),
plot_util.time_format(j.get_time_iowait())
]
except psutil.NoSuchProcess:
with j.proc.oneshot():
row = [j.plot_id[:8],
j.k,
abbr_path(j.tmpdir, tmp_prefix),
abbr_path(j.dstdir, dst_prefix),
plot_util.time_format(j.get_time_wall()),
phase_str(j.progress()),
plot_util.human_format(j.get_tmp_usage(), 0),
j.proc.pid,
j.get_run_status(),
plot_util.human_format(j.get_mem_usage(), 1),
plot_util.time_format(j.get_time_user()),
plot_util.time_format(j.get_time_sys()),
plot_util.time_format(j.get_time_iowait())
]
except (psutil.NoSuchProcess, psutil.AccessDenied):
# In case the job has disappeared
row = [j.plot_id[:8]] + (['--'] * 12)

Expand Down

0 comments on commit c068ab7

Please sign in to comment.