Skip to content

Commit

Permalink
Call confirm_delivery only once per channel
Browse files Browse the repository at this point in the history
  • Loading branch information
stchris committed Jul 1, 2024
1 parent 8b522b7 commit 9a67b5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion servicelayer/taskqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ def get_rabbitmq_channel() -> BlockingChannel:
)
local.connection = connection
local.channel = connection.channel()
local.channel.confirm_delivery()

# Check that the connection is alive
result = local.channel.exchange_declare(
Expand Down Expand Up @@ -826,7 +827,6 @@ def queue_task(
"priority": priority,
}
try:
rmq_channel.confirm_delivery()
rmq_channel.basic_publish(
exchange="",
routing_key=stage,
Expand Down

0 comments on commit 9a67b5a

Please sign in to comment.