steinitzu / celery-singleton

Seamlessly prevent duplicate executions of celery tasks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatic lock release on task apply_async

tbrien opened this issue · comments

I am using celery-signleton on a project and it saved us a bunch of headaches.
Thank you !

We encountered some exploitation trouble when restarting some workers and have implemented a way to challenge a singleton lock every time a task is submitted.
Doing so, an implementation for scanning celery worker state (see #17 ) and releasing the lock (see #3 ) have been made.
Since the two previous issues are related subjects, this new behavior might be merge. Of course, such behavior has no guaranties to have predictable implementations as the worker state cannot be known for sure. We used it on tasks scheduled regularly where the chances of having a schedule and a worker or scheduler restart simultaneously where very low.