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

get_key function return different key for same function. #120

Open
huanghugo opened this issue Apr 30, 2020 · 0 comments
Open

get_key function return different key for same function. #120

huanghugo opened this issue Apr 30, 2020 · 0 comments

Comments

@huanghugo
Copy link

huanghugo commented Apr 30, 2020

I'm use celery_once=3.0.0 in my project.

I have a task like:

@celery.task(base=QueueOnce)
def calculate_something():

But when I run the task on second time, it always throw AlreadyQueued exception. Seems like the key didn't been delete after this function ends.

So I create a class

class TestQueueOnce(QueueOnce):

and call get_key and print the key in apply_async and after_return

I found the key is different!

in after_return, the key is app.worker.analyze_tasks.calculate_something_args-()_kwargs-{}
in apply_async, the key is app.worker.analyze_tasks.calculate_something

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

No branches or pull requests

1 participant