make flake8 happy
This commit is contained in:
		| @@ -127,7 +127,7 @@ class Config(dict): | ||||
|         self.KEEP_ALIVE = keep_alive | ||||
|         self.WEBSOCKET_MAX_SIZE = 2 ** 20  # 1 megabytes | ||||
|         self.WEBSOCKET_MAX_QUEUE = 32 | ||||
|         self.GRACEFUL_SHUTDOWN_TIMEOUT = 15.0 # 15 sec | ||||
|         self.GRACEFUL_SHUTDOWN_TIMEOUT = 15.0  # 15 sec | ||||
|  | ||||
|         if load_env: | ||||
|             self.load_environment_vars() | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yun Xu
					Yun Xu