make flake8 happy

This commit is contained in:
Yun Xu 2017-06-25 10:22:40 -07:00
parent 221cf235b5
commit b5d1f52ea4
3 changed files with 5 additions and 4 deletions

View File

@ -403,7 +403,8 @@ def serve(host, port, request_handler, error_handler, before_start=None,
register_sys_signals=True, run_async=False, connections=None,
signal=Signal(), request_class=None, has_log=True, keep_alive=True,
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.
:param host: Address to host on

View File

@ -94,7 +94,8 @@ class GunicornWorker(base.Worker):
# gracefully shutdown timeout
start_shutdown = 0
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)
start_shutdown = start_shutdown + 0.1
@ -109,7 +110,6 @@ class GunicornWorker(base.Worker):
_shutdown = asyncio.gather(*coros, loop=self.loop)
await _shutdown
async def _run(self):
for sock in self.sockets:
state = dict(requests_count=0)