Closed aryanbaghi closed 6 years ago
I'll try it and if it works currently I'll modify pull request. (I think you are right) Thanks
@steinitzu I've tried with on_retry
and fail, because I cloud put duplicate tasks, I think retry
is better place to do this, because immediately after releasing the lock retry call apply async which lock it again and there is a small possibility to putting duplicate task in queue.
Thanks for contributing!
Can the lock be released in
on_retry
instead? http://docs.celeryproject.org/en/latest/reference/celery.app.task.html#celery.app.task.Task.on_retrySame as the
on_failure
handler https://github.com/steinitzu/celery-singleton/blob/581a308a33ec3acc321b9f62526ab69dd51b7b5a/celery_singleton/singleton.py#L88