Fix event loop (#32)

* Fix main by ensuring a new event loop is created
* fix Dockerfile workspace error
This commit was merged in pull request #32.
This commit is contained in:
Giacomo Bertolazzi
2025-10-13 22:34:28 +02:00
committed by GitHub
parent c96617a039
commit d85d6ed1eb
2 changed files with 4 additions and 5 deletions

View File

@@ -24,7 +24,9 @@ if __name__ == "__main__":
except AssertionError as e:
try:
logging.warning(f"Telegram bot could not be started: {e}")
asyncio.get_event_loop().run_forever()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_forever()
except KeyboardInterrupt:
logging.info("Shutting down due to KeyboardInterrupt")
finally: