|
async def _publish(self, data): |
|
connection = await self._connection() |
|
channel = await self._channel(connection) |
|
exchange = await self._exchange(channel) |
|
await exchange.publish( |
|
aio_pika.Message(body=pickle.dumps(data), |
|
delivery_mode=aio_pika.DeliveryMode.PERSISTENT), |
|
routing_key='*' |
|
) |
A connection is built every time it is publish can this place be improved?
python-socketio/socketio/asyncio_aiopika_manager.py
Lines 68 to 76 in 2f0d8bb
A connection is built every time it is publish can this place be improved?