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

Fix for queue once lock key not being deleted properly #92

Closed
wants to merge 1 commit into from

Conversation

kuba-lilz
Copy link

Problems: redis lacks flush

When running QueueOnce subclass task, I noticed the lock key never got deleted, event though QueueOnce.after_return was called and issued self.once_backend.clear_lock(key).
After examining it turned out that I had to add self.redis.flushall() to clear_lock(key) for key to be cleared properly.

Here are my libs versions:

In [1]: import redis, celery, celery_once

In [2]: redis.__version__
Out[2]: '3.2.0'

In [3]: celery.__version__
Out[3]: '4.2.1'

In [4]: celery_once.__version__
Out[4]: '2.1.0'

In this pull request I added redis.flushall() after lock delete request, which solves the issue.

Added redis.flushall() after lock delete request
@cameronmaske
Copy link
Owner

Hi @kuba-lilz flushall deletes all keys of all databases, I don't think it is the solution here.

This sounds like it could be related to #93 (the keys aren't generating correctly).
As I mentioned there, could you include the code snippet of the task and how it is called?

@kuba-lilz
Copy link
Author

kuba-lilz commented Apr 19, 2019

A bad implementation that tries to solve a problem that didn't exist, see discussion in #93

@kuba-lilz kuba-lilz closed this Apr 19, 2019
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.

None yet

3 participants