fix: fix issues with misinterpretation of max-jobs-per-timespan and max-jobs-per-seconds#3067
fix: fix issues with misinterpretation of max-jobs-per-timespan and max-jobs-per-seconds#3067johanneskoester merged 2 commits intomainfrom
Conversation
…ax-jobs-per-seconds
|
Warning Rate limit exceeded@johanneskoester has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 4 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes involve refactoring the job scheduling logic in the Changes
Sequence Diagram(s)sequenceDiagram
participant Scheduler
participant JobQueue
Scheduler->>JobQueue: schedule()
JobQueue->>Scheduler: _schedule_reevalutation(delay)
Scheduler->>Scheduler: Set up timer
Scheduler->>JobQueue: get_free_jobs()
JobQueue->>Scheduler: Return job status
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- snakemake/scheduler.py (4 hunks)
Additional context used
Path-based instructions (1)
snakemake/scheduler.py (1)
Pattern
**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of theselfargument of methods.
Do not suggest type annotation of theclsargument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturnstatement.
Additional comments not posted (6)
snakemake/scheduler.py (6)
251-253: LGTM!The refactoring of scheduling logic into a separate private method
_schedule_reevalutationimproves code organization and readability.
317-317: LGTM!The change is correctly utilizing the new
_schedule_reevalutationmethod and passing the appropriate delay parameter.
325-329: LGTM!The new private method
_schedule_reevalutationencapsulates the scheduling logic for reevaluation, improving code organization and readability. The type hint for thedelayparameter is correctly specified asint.
821-823: LGTM!The new
timespanproperty provides a convenient way to access thetimespanvalue of theMaxJobsPerTimespanobject associated with theJobRateLimiterinstance.
835-838: LGTM!The calculation of
n_freeensures that the number of free jobs is not negative by taking the maximum with 0. The debug logging statement provides useful information for monitoring the job rate limiting behavior.
839-839: LGTM!The change correctly returns the calculated number of free jobs.
|
🤖 I have created a release *beep* *boop* --- ## [8.19.1](v8.19.0...v8.19.1) (2024-09-04) ### Bug Fixes * fix issues with misinterpretation of max-jobs-per-timespan and max-jobs-per-seconds ([#3067](#3067)) ([d82453b](d82453b)) * pip deployment path ([#3062](#3062)) ([bf9305b](bf9305b)) * return empty set if rate limiter at max ([#3060](#3060)) ([4e59963](4e59963)) * use wrapt_timeout_decorator, instead of stopit ([#2938](#2938)) ([3b64e41](3b64e41)) * Wrong linenumbers reported when linting ([#2985](#2985)) ([3a8bd36](3a8bd36)) ### Documentation * update `doc-environment.yml` file and Documentation Setup documentation ([#3058](#3058)) ([a540a2e](a540a2e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>



fixes #3042, fixes #3019
QC
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).Summary by CodeRabbit