mirror of
https://github.com/solero/houdini.git
synced 2024-11-21 21:17:21 +00:00
Shutdown more gracefully for KeyboardInterrupt
This commit is contained in:
parent
fa8abed189
commit
ac246fda18
@ -1,5 +1,6 @@
|
||||
import asyncio
|
||||
import sys
|
||||
import logging
|
||||
from houdini.houdini import HoudiniFactory
|
||||
|
||||
if __name__ == '__main__':
|
||||
@ -7,5 +8,9 @@ if __name__ == '__main__':
|
||||
loop = asyncio.ProactorEventLoop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
logger = logging.getLogger('houdini')
|
||||
factory_instance = HoudiniFactory(server='Login')
|
||||
asyncio.run(factory_instance.start())
|
||||
try:
|
||||
asyncio.run(factory_instance.start())
|
||||
except KeyboardInterrupt:
|
||||
logger.info('Shutting down...')
|
||||
|
Loading…
Reference in New Issue
Block a user