MCPcopy Create free account
hub / github.com/celery/celery / _error_handler

Method _error_handler

celery/worker/consumer/consumer.py:645–654  ·  view source on GitHub ↗
(exc, interval, next_step=CONNECTION_RETRY_STEP)

Source from the content-addressed store, hash-verified

643 # Callback called for each retry while the connection
644 # can't be established.
645 def _error_handler(exc, interval, next_step=CONNECTION_RETRY_STEP):
646 if getattr(conn, 'alt', None) and interval == 0:
647 next_step = CONNECTION_FAILOVER
648 elif interval > 0:
649 self.broker_connection_retry_attempt += 1
650 next_step = next_step.format(
651 when=humanize_seconds(interval, 'in', ' '),
652 retries=self.broker_connection_retry_attempt,
653 max_retries=self.app.conf.broker_connection_max_retries)
654 error(CONNECTION_ERROR, conn.as_uri(), exc, next_step)
655
656 # Remember that the connection is lazy, it won't establish
657 # until needed.

Callers

nothing calls this directly

Calls 3

humanize_secondsFunction · 0.90
formatMethod · 0.45
as_uriMethod · 0.45

Tested by

no test coverage detected