Skip to content

Commit

Permalink
Add username to processing status info
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Aug 30, 2024
1 parent 542fd68 commit a08ece3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions damnit/backend/extract_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import socket
import subprocess
import sys
from getpass import getuser
from pathlib import Path
from tempfile import TemporaryDirectory
from uuid import uuid4
Expand Down Expand Up @@ -186,6 +187,7 @@ def __init__(self, proposal, run, cluster=False, run_data=RunData.ALL,
'run': run,
'data': run_data.value,
'hostname': socket.gethostname(),
'username': getuser(),
'slurm_cluster': self._slurm_cluster(),
'slurm_job_id': os.environ.get('SLURM_JOB_ID', ''),
})
Expand Down
2 changes: 1 addition & 1 deletion damnit/gui/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def update_processing_status(self, proposal, run):
runnr_item.setData(f"{run} ⚙️", Qt.ItemDataRole.DisplayRole)
if len(jobs_for_run) == 1:
info = jobs_for_run[0]
msg = f"Processing on {info['hostname']}"
msg = f"Processing on {info['username']}@{info['hostname']}"
if job_id := info['slurm_job_id']:
msg += f" (Slurm job {job_id})"
runnr_item.setToolTip(msg)
Expand Down

0 comments on commit a08ece3

Please sign in to comment.