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

allow max concurrent runs and singleton mode together #625

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

JohnRoesler
Copy link
Contributor

What does this do?

allows for singleton mode and max concurrent runs to be combined. The resulting behavior is that if you have a limit of say 2 jobs concurrently, you can't have one job take both those slots. By having singleton enabled on a job, it is prevented from running by two limitModeRunners simultaneously.

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

#624

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

_, ok := e.limitMode.singletonJobs[id]
if ok {
// this job is already running, so don't run it
// but instead reschedule it
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effectively, singleton mode is always reschedule with max concurrent. Is there a need to allow for singleton jobs to wait? It seems like no

@JohnRoesler JohnRoesler merged commit 5814fbc into v2 Nov 28, 2023
3 checks passed
@JohnRoesler JohnRoesler deleted the limitmodesingleton branch November 28, 2023 12:48
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.

1 participant