Skip to content

Commit

Permalink
autodelete component queues
Browse files Browse the repository at this point in the history
  • Loading branch information
zachschubert committed Aug 9, 2022
1 parent ffc9210 commit 79b4b28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ergo/amqp_invoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, invocable: FunctionInvocable) -> None:
component_queue_name = f"{self._invocable.config.func}".replace("/", ":")
if component_queue_name.startswith(":"):
component_queue_name = component_queue_name[1:]
self._component_queue = kombu.Queue(name=component_queue_name, exchange=self._exchange, routing_key=str(SubTopic(self._invocable.config.subtopic)), durable=False)
self._component_queue = kombu.Queue(name=component_queue_name, exchange=self._exchange, routing_key=str(SubTopic(self._invocable.config.subtopic)), durable=False, autodelete=True)
instance_queue_name = f"{component_queue_name}:{instance_id()}"
self._instance_queue = kombu.Queue(name=instance_queue_name, exchange=self._exchange, routing_key=str(SubTopic(instance_id())), auto_delete=True)
error_queue_name = f"{component_queue_name}:error"
Expand Down

0 comments on commit 79b4b28

Please sign in to comment.