celery-once
celery-once copied to clipboard
Only delay and apply_async check against the lock.
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
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()