Application restart introduced.

When processing a restart request, the router sends a QUIT message to all
existing processes of the application.  Then, a new shared application port is
created to ensure that new requests won't be handled by the old processes of
the application.
This commit is contained in:
Max Romanov
2021-07-29 19:50:39 +03:00
parent f3a1c1deb5
commit fa9fb29be2
10 changed files with 454 additions and 41 deletions

View File

@@ -0,0 +1,10 @@
import os
import time
time.sleep(2)
def application(environ, start_response):
body = str(os.getpid()).encode()
start_response('200', [('Content-Length', str(len(body)))])
return [body]