improved aiotools.run()

This commit is contained in:
Maxim Devaev
2022-07-17 15:27:02 +03:00
parent b7e220b4c5
commit be8032893e
3 changed files with 60 additions and 55 deletions

View File

@@ -61,10 +61,7 @@ class JanusRunner: # pylint: disable=too-many-instance-attributes
def run(self) -> None:
logger = get_logger(0)
logger.info("Starting Janus Runner ...")
try:
aiotools.run(self.__run())
except (SystemExit, KeyboardInterrupt):
aiotools.run(self.__stop_janus())
aiotools.run(self.__run(), self.__stop_janus())
logger.info("Bye-bye")
# =====