Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ def run_job(self, job: JobExecutorInterface):

exec_job = self.format_job_exec(job)

# Prevent forwarding Snakemake retry attempts into the remote
# jobstep. Convert any "--attempt <n>" or "--attempt=<n>" to
# a single attempt in the remote context.
exec_job = re.sub(r"--attempt(?:[=\s]+)\d+", "--attempt 1", exec_job)

# and finally the job to execute with all the snakemake parameters
call += f' --wrap="{exec_job}"'

Expand Down