Commit 3d024a0
fix: pipeline hangs when submitting from compute nodes
When running snakemake from within a SLURM job (e.g., an interactive
session on a compute node), the pipeline would submit jobs but never
detect their completion, hanging forever.
The RemoteExecutor base class starts a status-checking daemon thread
in __init__ before __post_init__ is called. The SLURM plugin's
warn_on_jobcontext() in __post_init__ would sleep 5 seconds and then
delete SLURM environment variables, but by then the daemon thread had
already started and would silently die after its first polling cycle.
Fix: move the SLURM environment detection and cleanup into __init__,
before super().__init__() starts the daemon thread. Remove the now
unnecessary warn_on_jobcontext() method and its 5-second sleep.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7fa975f commit 3d024a0
File tree
2 files changed
+22
-24
lines changed- snakemake_executor_plugin_slurm
- tests
2 files changed
+22
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
431 | 446 | | |
432 | | - | |
433 | | - | |
434 | 447 | | |
435 | 448 | | |
436 | 449 | | |
| |||
617 | 630 | | |
618 | 631 | | |
619 | 632 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 49 | + | |
| 50 | + | |
0 commit comments