Skip to content

feat: added requeue option to client #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 27, 2024
15 changes: 15 additions & 0 deletions snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ class ExecutorSettings(ExecutorSettingsBase):
"required": False,
},
)
requeue: bool = field(
default=False,
metadata={
"help": """
Allow requeuing preempted of failed jobs,
if no cluster default. Results in `sbatch ... --requeue ...`
This flag has no effect, if not set.
""",
"env_var": False,
"required": False,
},
)


# Required:
Expand Down Expand Up @@ -145,6 +157,9 @@ def run_job(self, job: JobExecutorInterface):
call += self.get_account_arg(job)
call += self.get_partition_arg(job)

if self.settings.requeue:
call += " --requeue"

if job.resources.get("clusters"):
call += f" --clusters {job.resources.clusters}"

Expand Down
Loading