Skip to content

Commit

Permalink
SIANXSVC-1060: Fix queues not cleaned up after an `AMQPWaitTimeoutExc…
Browse files Browse the repository at this point in the history
…eption`

Celery has and requires its own TimeoutException instead of the builtin one to properly clean up py-amqp Consumers.
  • Loading branch information
PatrickTaibel committed Oct 24, 2023
1 parent c617b06 commit 833a431
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion celery_amqp_backend/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import celery.exceptions

__all__ = [
'AMQPBacklogLimitExceededException',
'AMQPWaitEmptyException',
Expand Down Expand Up @@ -25,5 +27,5 @@ class AMQPWaitEmptyException(BaseCeleryException):
_msg_template = 'No message got drained from the queue while waiting for "{task}".'


class AMQPWaitTimeoutException(BaseCeleryException, TimeoutError):
class AMQPWaitTimeoutException(BaseCeleryException, celery.exceptions.TimeoutError):
_msg_template = 'The operation timed out.'

0 comments on commit 833a431

Please sign in to comment.