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

Don't remove the key when job is executed #18

Merged
merged 1 commit into from
Mar 4, 2023

Conversation

kukicola
Copy link
Collaborator

@kukicola kukicola commented Mar 3, 2023

Let's consider a case:

  • job A is added to the schedule set and debounce key is created in redis
  • job A is taken from schedule set and pushed to queue (and due to long queue it's waiting there)
  • job B is added to the schedule set and new debounce key is created
  • job A is processed and middleware removed debounce key created by job B
  • job C is added to the schedule set and since debounce key was removed it won't be merged with job B

To fix that, we can keep debounce keys in redis and let them be removed automatically. Lua scripts checks if a job that is in debounce key exists in schedule set so it shouldn't lead to any problems

@kukicola kukicola requested a review from tallica March 3, 2023 19:32
@kukicola kukicola merged commit 51ca772 into master Mar 4, 2023
@kukicola kukicola deleted the skip-removing-key-in-redis branch March 4, 2023 17:32
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.

2 participants