Commit 4e59963
authored
fix: return empty set if rate limiter at max (#3060)
<!--Add a description of your PR here-->
When running locally with a rate limiter, if rate limiter reaches the
max number of jobs `job_selector` function returns `None` and snakemake
fails on line:
https://github.com/snakemake/snakemake/blob/f9554786e9d7f81c0195e0d9ab3c22b7fe611799/snakemake/scheduler.py#L278-L281
with error:
```
TypeError: object of type 'NoneType' has no len()
```
### QC
<!-- Make sure that you can tick the boxes below. -->
* [ ] The PR contains a test case for the changes or the changes are
already covered by an existing test case.
* [ ] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved job selection logic to ensure an empty set is returned when
no free jobs are available, enhancing system reliability and preventing
unintended behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent a540a2e commit 4e59963
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
| |||
0 commit comments