Merge pull request #655 from seemethere/fix_gunicorn_worker

Fix duplicate signal settings for gunicorn worker
This commit is contained in:
Raphael Deem 2017-04-21 22:16:43 -07:00 committed by GitHub
commit 97018ad62f

View File

@ -3,6 +3,7 @@ import sys
import signal import signal
import asyncio import asyncio
import logging import logging
try: try:
import ssl import ssl
except ImportError: except ImportError:
@ -50,8 +51,8 @@ class GunicornWorker(base.Worker):
debug=is_debug, debug=is_debug,
protocol=protocol, protocol=protocol,
ssl=self.ssl_context, ssl=self.ssl_context,
run_async=True run_async=True)
) self._server_settings['signal'] = self.signal
self._server_settings.pop('sock') self._server_settings.pop('sock')
trigger_events(self._server_settings.get('before_start', []), trigger_events(self._server_settings.get('before_start', []),
self.loop) self.loop)
@ -97,7 +98,6 @@ class GunicornWorker(base.Worker):
self.servers.append(await serve( self.servers.append(await serve(
sock=sock, sock=sock,
connections=self.connections, connections=self.connections,
signal=self.signal,
**self._server_settings **self._server_settings
)) ))