make flake8 happy
This commit is contained in:
parent
221cf235b5
commit
b5d1f52ea4
|
@ -403,7 +403,8 @@ def serve(host, port, request_handler, error_handler, before_start=None,
|
||||||
register_sys_signals=True, run_async=False, connections=None,
|
register_sys_signals=True, run_async=False, connections=None,
|
||||||
signal=Signal(), request_class=None, has_log=True, keep_alive=True,
|
signal=Signal(), request_class=None, has_log=True, keep_alive=True,
|
||||||
is_request_stream=False, router=None, websocket_max_size=None,
|
is_request_stream=False, router=None, websocket_max_size=None,
|
||||||
websocket_max_queue=None, state=None, graceful_shutdown_timeout=15.0):
|
websocket_max_queue=None, state=None,
|
||||||
|
graceful_shutdown_timeout=15.0):
|
||||||
"""Start asynchronous HTTP Server on an individual process.
|
"""Start asynchronous HTTP Server on an individual process.
|
||||||
|
|
||||||
:param host: Address to host on
|
:param host: Address to host on
|
||||||
|
|
|
@ -94,7 +94,8 @@ class GunicornWorker(base.Worker):
|
||||||
# gracefully shutdown timeout
|
# gracefully shutdown timeout
|
||||||
start_shutdown = 0
|
start_shutdown = 0
|
||||||
graceful_shutdown_timeout = self.cfg.graceful_timeout
|
graceful_shutdown_timeout = self.cfg.graceful_timeout
|
||||||
while self.connections and (start_shutdown < graceful_shutdown_timeout):
|
while self.connections and \
|
||||||
|
(start_shutdown < graceful_shutdown_timeout):
|
||||||
await asyncio.sleep(0.1)
|
await asyncio.sleep(0.1)
|
||||||
start_shutdown = start_shutdown + 0.1
|
start_shutdown = start_shutdown + 0.1
|
||||||
|
|
||||||
|
@ -109,7 +110,6 @@ class GunicornWorker(base.Worker):
|
||||||
_shutdown = asyncio.gather(*coros, loop=self.loop)
|
_shutdown = asyncio.gather(*coros, loop=self.loop)
|
||||||
await _shutdown
|
await _shutdown
|
||||||
|
|
||||||
|
|
||||||
async def _run(self):
|
async def _run(self):
|
||||||
for sock in self.sockets:
|
for sock in self.sockets:
|
||||||
state = dict(requests_count=0)
|
state = dict(requests_count=0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user