Skip to content

Commit

Permalink
RabbitMQ: Init queue on topic open
Browse files Browse the repository at this point in the history
  • Loading branch information
isra17 committed Nov 23, 2023
1 parent c06441e commit 48c4496
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/saturn_engine/worker/topics/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def __init__(self, options: Options, services: Services, **kwargs: object) -> No
)
self.queue_arguments.setdefault("x-overflow", self.options.overflow)

async def open(self) -> None:
await self.ensure_queue()

async def run(self) -> AsyncGenerator[t.AsyncContextManager[TopicMessage], None]:
if self.is_closed:
raise TopicClosedError()
Expand Down

0 comments on commit 48c4496

Please sign in to comment.