Establish the broker connection used for consuming tasks. Retries establishing the connection if the :setting:`broker_connection_retry` setting is enabled
(self)
| 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( |
no test coverage detected