app.celery.MyCelery.connection_or_acquire
- MyCelery.connection_or_acquire(connection=None, pool=True, *_, **__)
Context used to acquire a connection from the pool.
For use within a
with
statement to get a connection from the pool if one is not already provided.- Parameters
connection (kombu.Connection) – If not provided, a connection will be acquired from the connection pool.