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

Only enqueue a sched job if the worker removed it #51

Merged
merged 3 commits into from
Oct 3, 2024
Merged

Conversation

film42
Copy link
Owner

@film42 film42 commented Oct 2, 2024

It was reported in #50 that we have a race-condition with this scheduled enqueuer code. I think the issue was that I was assuming that redis would coerce a 0 to false and a 1 to true, but I don't think that's really the case. (Still need to double check that).

Better yet, we should add a new test to prove this.

NOTE: I also updated the n reported by this method to only count the n if it actually enqueued a job.

NOTE 2: I think it's best if we bring the enqueue batch size down from 100 to 10.

film42 added 3 commits October 3, 2024 01:19
It was reported in #50 that we
have a race-condition with this scheduled enqueuer code. I think the
issue was that I was _assuming_ that redis would coerce a 0 to false and
a 1 to true, but  I don't think that's really the case. (Still need to
double check that).

Better yet, we should add a new test to prove this.

NOTE: I also updated the `n` reported by this method to only count the
`n` if it actually enqueued a job.

NOTE 2: I think it's best if we bring the enqueue batch size down from
100 to 10.
@film42 film42 merged commit 47c8032 into master Oct 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant