Flake8 fix

This commit is contained in:
messense 2017-03-13 17:41:47 +08:00
parent f35442ad1b
commit decd3e737c
No known key found for this signature in database
GPG Key ID: BB41A8A2C716CCA9

View File

@ -40,12 +40,15 @@ class GunicornWorker(base.Worker):
try: try:
self.loop.run_until_complete(self._runner) self.loop.run_until_complete(self._runner)
trigger_events(self._server_settings.get('after_start', []), self.loop) trigger_events(self._server_settings.get('after_start', []),
self.loop)
self.loop.run_until_complete(self._check_alive()) self.loop.run_until_complete(self._check_alive())
finally: finally:
trigger_events(self._server_settings.get('before_stop', []), self.loop) trigger_events(self._server_settings.get('before_stop', []),
self.loop)
self.loop.close() self.loop.close()
trigger_events(self._server_settings.get('after_stop', []), self.loop) trigger_events(self._server_settings.get('after_stop', []),
self.loop)
async def close(self): async def close(self):
if self.servers: if self.servers: