celery-once
celery-once copied to clipboard
Missing apply_async ConnectionError handling
While calling apply_async
i got this:
File "/usr/local/lib/python3.6/site-packages/redis/connection.py" in send_packed_command
709. (errno, errmsg))
Exception Type: OperationalError at <url>
Exception Value: Error 104 while writing to socket. Connection reset by peer.
and the key has been locked even though there was no task on the queue.
I feel like here the case when apply_async
call fails (doesn't push task on the queue) is not handled, so we end up in a state where the key is locked and we don't have the task in the queue. I haven't tried to reproduce this, maybe it's possible to just have redis settings point to an invalid endpoint.
I have the same problem, when ConnectionError is raised task is remaining locked.