cameronmaske / celery-once

Celery Once allows you to prevent multiple execution and queuing of celery tasks.
https://pypi.python.org/pypi/celery_once/
BSD 2-Clause "Simplified" License
661 stars 90 forks source link

Bug: Issue with shared_task #57

Open swapnilsm opened 7 years ago

swapnilsm commented 7 years ago

Doesn't work with shared_task. When used with shared_task, the task doesn't get auto-discovered. Just importing the QueueOnce makes all the tasks undiscoverable.

swapnilsm commented 7 years ago

Passing once={'graceful': True} to shared_task makes those tasks undiscoverable.

DiegoGallegos4 commented 6 years ago

Any comments on this? @swapnilsm did you get it working?

swapnilsm commented 6 years ago

@DiegoGallegos4 We finally had to move to passing those parameters like these. app.tasks['project.tasks.task1'].signature((), once={'graceful': True}).apply_async()