Skip to content

Commit aef04e9

Browse files
committed
Call channel close before returning queue query (#954)
1 parent 48ce98c commit aef04e9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/server/oasisapi/queues/utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ def _get_queue_consumers(queue_name):
1414
with celery_app.pool.acquire(block=True) as conn:
1515
chan = conn.channel()
1616
name, message_count, consumers = chan.queue_declare(queue=queue_name, passive=True)
17+
chan.close()
1718
return consumers
1819

1920

2021
def _get_queue_message_count(queue_name):
2122
with celery_app.pool.acquire(block=True) as conn:
2223
chan = conn.channel()
2324
name, message_count, consumers = chan.queue_declare(queue=queue_name, passive=True)
25+
chan.close()
2426
return message_count
2527

2628

0 commit comments

Comments
 (0)