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

Make sure jobs claimed are those claimed for the given process ID #48

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

rosa
Copy link
Member

@rosa rosa commented Nov 29, 2023

And not another process claiming the same jobs, since the INSERT query in the claimed_executions table would ignore any duplicates on job_id. Moreover, make that INSERT fail when there are any duplicates, so we get some visibility on how this might be happening.

This is a guard for a supposedly impossible situation described in this card, that I haven't managed to explain. It shouldn't harm in any case.

rosa added 2 commits November 29, 2023 23:04
And not another process claiming the same jobs, since the INSERT query in the
claimed_executions table would ignore any duplicates on job_id.
…ates

The name `lock` alone was confusing because it's the same as ActiveRecord's lock
method, and `candidates` was a bit ambiguous, easy to say explicitly that the candidates
are job IDs.
@rosa rosa force-pushed the claim-claimed-jobs branch from 1464357 to 7ffbb40 Compare November 30, 2023 09:11
@rosa rosa merged commit 665bff1 into main Nov 30, 2023
@rosa rosa deleted the claim-claimed-jobs branch November 30, 2023 14:54
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