MCPcopy
hub / github.com/celery/celery / connect

Method connect

celery/worker/consumer/consumer.py:469–478  ·  view source on GitHub ↗

Establish the broker connection used for consuming tasks. Retries establishing the connection if the :setting:`broker_connection_retry` setting is enabled

(self)

Source from the content-addressed store, hash-verified

467 self.pool.flush()
468
469 def connect(self):
470 """Establish the broker connection used for consuming tasks.
471
472 Retries establishing the connection if the
473 :setting:`broker_connection_retry` setting is enabled
474 """
475 conn = self.connection_for_read(heartbeat=self.amqheartbeat)
476 if self.hub:
477 conn.transport.register_with_event_loop(conn.connection, self.hub)
478 return conn
479
480 def connection_for_read(self, heartbeat=None):
481 return self.ensure_connected(

Callers 2

startMethod · 0.45
ensure_connectedMethod · 0.45

Calls 2

connection_for_readMethod · 0.95

Tested by

no test coverage detected