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 delay and apply_async check against the lock. #113

Open
sogloarcadius opened this issue Dec 27, 2019 · 1 comment
Open

Only delay and apply_async check against the lock. #113

sogloarcadius opened this issue Dec 27, 2019 · 1 comment

Comments

@sogloarcadius
Copy link

Hello,

I am struglling to make celery-once check against the lock when using celery.send_task.
Can you explain me the reason why it fails to check against the lock when using send_task ?
Is it possible to add this feature to the library ?

I am making the flower rest api available to the end users to make calls to my tasks and it would be great if celery_once could prevent calling the task when using send_task endpoint ?

Thanks,

Regards

@frankV
Copy link

frankV commented Sep 20, 2020

Hey @sogloarcadius this is probably late for you, but in case someone else finds this you can use a signature instead of send_task.

It works similar to send_task, here's an example:

from celery import signature

signature("task.name", (arg1, arg2), countdown=60,).apply_async()

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

2 participants