Skip to content

Commit

Permalink
fix: proper line ending status message (#87)
Browse files Browse the repository at this point in the history
Addresses the issue #82
  • Loading branch information
cmeesters committed May 14, 2024
1 parent 50637cb commit 7b94aec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ async def check_active_jobs(

# We use this sacct syntax for argument 'starttime' to keep it compatible
# with slurm < 20.11
sacct_starttime = f"{datetime.now() - timedelta(days=2):%Y-%m-%dT%H:00}"
sacct_starttime = f"{datetime.now() - timedelta(days = 2):%Y-%m-%dT%H:00}"
# previously we had
# f"--starttime now-2days --endtime now --name {self.run_uuid}"
# in line 218 - once v20.11 is definitively not in use any more,
Expand Down Expand Up @@ -293,7 +293,9 @@ async def check_active_jobs(
elif status in fail_stati:
msg = (
f"SLURM-job '{j.external_jobid}' failed, SLURM status is: "
f"'{status}'"
# message ends with '. ', because it is proceeded
# with a new sentence
f"'{status}'. "
)
self.report_job_error(j, msg=msg, aux_logs=[j.aux["slurm_logfile"]])
active_jobs_seen_by_sacct.remove(j.external_jobid)
Expand Down

0 comments on commit 7b94aec

Please sign in to comment.