Skip to content

Commit

Permalink
Ensure ioloops defined in run are started
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Jan 16, 2025
1 parent 2ef70bb commit f01d50a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neon_mq_connector/consumers/select_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ def run(self):
get_event_loop()
except RuntimeError as e:
LOG.warning(e)
set_event_loop(new_event_loop())
loop = new_event_loop()
set_event_loop(loop)
loop.run_forever()
if not self.is_consuming:
try:
self.connection: pika.SelectConnection = self.create_connection()
Expand Down

0 comments on commit f01d50a

Please sign in to comment.