tobymao / saq

Simple Async Queues
https://saq-py.readthedocs.io/en/latest/
MIT License
577 stars 39 forks source link

Wait for Postgres queue tasks to finish cancelling when disconnecting #140

Closed vchan closed 2 months ago

vchan commented 2 months ago

This prevents warnings like the one below during health checks (even if the check succeeds):

ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-35' coro=<PostgresQueue.listen_for_enqueues() running at saq/queue/postgres.py:540> wait_for=<Future pending cb=[Task.task_wakeup()]>>