snakemake-executor-plugin-slurm 1.0.1__py3-none-any.whl → 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of snakemake-executor-plugin-slurm might be problematic. Click here for more details.

@@ -74,6 +74,18 @@ class ExecutorSettings(ExecutorSettingsBase):
74
74
  "required": False,
75
75
  },
76
76
  )
77
+ status_attempts: Optional[int] = field(
78
+ default=5,
79
+ metadata={
80
+ "help": "Defines the number of attempts to query the status of "
81
+ "all active jobs. If the status query fails, the next attempt "
82
+ "will be performed after the next status check interval."
83
+ "The default is 5 status attempts before giving up. The maximum "
84
+ "time between status checks is 180 seconds.",
85
+ "env_var": False,
86
+ "required": False,
87
+ },
88
+ )
77
89
  requeue: bool = field(
78
90
  default=False,
79
91
  metadata={
@@ -376,7 +388,11 @@ class Executor(RemoteExecutor):
376
388
 
377
389
  sacct_query_durations = []
378
390
 
379
- status_attempts = 5
391
+ status_attempts = self.workflow.executor_settings.status_attempts
392
+ self.logger.debug(
393
+ f"Checking the status of {len(active_jobs)} active jobs "
394
+ f"with {status_attempts} attempts."
395
+ )
380
396
 
381
397
  active_jobs_ids = {job_info.external_jobid for job_info in active_jobs}
382
398
  active_jobs_seen_by_sacct = set()
@@ -510,7 +526,7 @@ We leave it to SLURM to resume your job(s)"""
510
526
  self.next_seconds_between_status_checks + 10, max_sleep_time
511
527
  )
512
528
  else:
513
- self.next_seconds_between_status_checks = None
529
+ self.next_seconds_between_status_checks = 40
514
530
 
515
531
  def cancel_jobs(self, active_jobs: List[SubmittedJobInfo]):
516
532
  # Cancel all active jobs.
@@ -570,10 +586,22 @@ We leave it to SLURM to resume your job(s)"""
570
586
  for entry in csv.reader(StringIO(command_res), delimiter="|")
571
587
  }
572
588
  except subprocess.CalledProcessError as e:
573
- self.logger.error(
574
- f"The job status query failed with command: {command}\n"
575
- f"Error message: {e.stderr.strip()}\n"
576
- )
589
+ error_message = e.stderr.strip()
590
+ if "slurm_persist_conn_open_without_init" in error_message:
591
+ self.logger.warning(
592
+ "The SLURM database might not be available ... "
593
+ f"Error message: '{error_message}'"
594
+ "This error message indicates that the SLURM database is currently "
595
+ "not available. This is not an error of the Snakemake plugin, "
596
+ "but some kind of server issue. "
597
+ "Please consult with your HPC provider."
598
+ )
599
+ else:
600
+ self.logger.error(
601
+ f"The job status query failed with command '{command}'"
602
+ f"Error message: '{error_message}'"
603
+ "This error message is not expected, please report it back to us."
604
+ )
577
605
  pass
578
606
 
579
607
  return (res, query_duration)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: snakemake-executor-plugin-slurm
3
- Version: 1.0.1
3
+ Version: 1.1.0
4
4
  Summary: A Snakemake executor plugin for submitting jobs to a SLURM cluster.
5
5
  License: MIT
6
6
  Keywords: snakemake,plugin,executor,cluster,slurm
@@ -0,0 +1,6 @@
1
+ snakemake_executor_plugin_slurm/__init__.py,sha256=yNz8JRS5jDcY4Jyr16Fvk5afGMDyYAEHuoackPcK-MI,32142
2
+ snakemake_executor_plugin_slurm/utils.py,sha256=ZzXiXFDVLs15PLJnDP0eq98fNCtzlLbhtT03ec8Ou34,3578
3
+ snakemake_executor_plugin_slurm-1.1.0.dist-info/LICENSE,sha256=YVc4xTLWMqGfFL36120k7rzXtsT6e4RkJsh68VVn12s,1076
4
+ snakemake_executor_plugin_slurm-1.1.0.dist-info/METADATA,sha256=0h-JOJUxaORswgyMb18PpTcvGlI1lrpUUSXR9h8kBWk,1360
5
+ snakemake_executor_plugin_slurm-1.1.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
6
+ snakemake_executor_plugin_slurm-1.1.0.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- snakemake_executor_plugin_slurm/__init__.py,sha256=d9aiBqYfhZY54ooqiawCQ67Kv2cFVpUrLCtSAjFvr6c,30722
2
- snakemake_executor_plugin_slurm/utils.py,sha256=ZzXiXFDVLs15PLJnDP0eq98fNCtzlLbhtT03ec8Ou34,3578
3
- snakemake_executor_plugin_slurm-1.0.1.dist-info/LICENSE,sha256=YVc4xTLWMqGfFL36120k7rzXtsT6e4RkJsh68VVn12s,1076
4
- snakemake_executor_plugin_slurm-1.0.1.dist-info/METADATA,sha256=BK6xoB4FHYho7p5mxYUOlsp2T8dipyuUIV21b0sLVOE,1360
5
- snakemake_executor_plugin_slurm-1.0.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
6
- snakemake_executor_plugin_slurm-1.0.1.dist-info/RECORD,,