gracefully terminate web server

In previous revisions server was terminated by itself, thus no lock or
socket was removed. In new version, graceful termination of the queue
has been added as well as server now handles singals
This commit is contained in:
2023-03-06 01:13:41 +02:00
parent 1fdcea0524
commit ded896ee1b
6 changed files with 103 additions and 77 deletions

View File

@ -55,3 +55,7 @@ class Web(Handler):
application = setup_service(architecture, configuration, spawner)
run_server(application)
# terminate spawn process at the last
spawner.stop()
spawner.join()