Merge branch 'develop' into dist/risotto/risotto-2.8.0/develop

This commit is contained in:
Emmanuel Garette 2020-11-14 19:01:34 +01:00
commit 980a119ef9
2 changed files with 8 additions and 2 deletions

View File

@ -1,13 +1,16 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from sdnotify import SystemdNotifier
from asyncio import get_event_loop from asyncio import get_event_loop
from risotto import get_app from risotto import get_app
if __name__ == '__main__': if __name__ == '__main__':
notifier = SystemdNotifier()
loop = get_event_loop() loop = get_event_loop()
loop.run_until_complete(get_app(loop)) loop.run_until_complete(get_app(loop))
try:
print('HTTP server ready') print('HTTP server ready')
notifier.notify("READY=1")
try:
loop.run_forever() loop.run_forever()
except KeyboardInterrupt: except KeyboardInterrupt:
pass pass

View File

@ -174,7 +174,10 @@ async def get_app(loop):
await dispatcher.register_remote() await dispatcher.register_remote()
print() print()
await dispatcher.on_join() await dispatcher.on_join()
return await loop.create_server(app.make_handler(), '*', get_config()['http_server']['port']) return await loop.create_server(app.make_handler(),
'*',
get_config()['http_server']['port'],
)
TIRAMISU = None TIRAMISU = None