Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix case where OneTimeJob with concurrent limit and limited runs fails to run #703

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

JohnRoesler
Copy link
Contributor

What does this do?

Moves the check for WithLimitedRuns to the new job completed channel instead of having it on the scheduling channel. Currently there is an interesting bug highlighted in #691.

What's actually happening now this case you provided, is that the job is being sent to the wait mode limiter and before it has a chance to run, it's being removed by the scheduler because it thinks the job has run already and reached it's limit.

Which issue(s) does this PR fix/relate to?

resolves #691

List any changes that modify/break current functionality

Have you included tests for your changes?

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

@JohnRoesler JohnRoesler merged commit dcd4eda into v2 Mar 26, 2024
3 checks passed
@JohnRoesler JohnRoesler deleted the fix-WithLimitedRuns-OneTimeJob branch March 26, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - Scheduler started with WithLimitConcurrentJobs with WithLimitWait does not run a OneOffJob since 2.2.5
1 participant