Skip to content

Handle case of concurrency limit not being set in Semaphore #221

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

Merged
merged 3 commits into from
May 8, 2024

Conversation

rosa
Copy link
Member

@rosa rosa commented May 8, 2024

Avoid crashing in this case, just assume concurrency limit is 1. This shouldn't happen with normal operation but we've had this problem when jobs that are concurrency-limited are enqueued from new code and dispatched from old code, where the job still doesn't have concurrency controls, thus returning nil for the limit and crashing the dispatcher.

rosa added 3 commits May 8, 2024 11:38
Avoid crashing in this case, just assume concurrency limit is 1. This shouldn't
happen with normal operation but we've had this problem when jobs that are
concurrency-limited are enqueued from new code and dispatched from old code,
where the job still doesn't have concurrency controls.
That raises if the timeout is reached, instead of ignoring.
Sometimes 10 seconds is too short for Sqlite and the job ends up
finishing.
@rosa rosa merged commit 53b6189 into main May 8, 2024
8 checks passed
@rosa rosa deleted the handle-nil-limit branch May 8, 2024 14:30
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