diff --git a/snakemake_executor_plugin_slurm/__init__.py b/snakemake_executor_plugin_slurm/__init__.py index d822ef8..3de1812 100644 --- a/snakemake_executor_plugin_slurm/__init__.py +++ b/snakemake_executor_plugin_slurm/__init__.py @@ -148,6 +148,14 @@ class ExecutorSettings(ExecutorSettingsBase): "required": False, }, ) + prefix: str = field( + default="", + metadata={ + "help": "Prefix that is added to the job names", + "env_var": False, + "required": False + } + ) # Required: @@ -181,7 +189,7 @@ def __post_init__(self, test_mode: bool = False): # run check whether we are running in a SLURM job context self.warn_on_jobcontext() self.test_mode = test_mode - self.run_uuid = str(uuid.uuid4()) + self.run_uuid = self.workflow.executor_settings.prefix + str(uuid.uuid4()) self.logger.info(f"SLURM run ID: {self.run_uuid}") self._fallback_account_arg = None self._fallback_partition = None