Merge pull request #855 from floqqi/master

Windows: Use SIGTERM instead of SIGKILL
main
Selwin Ong 8 years ago committed by GitHub
commit 3666f4987e

@ -14,6 +14,11 @@ import traceback
import warnings import warnings
from datetime import timedelta from datetime import timedelta
try:
from signal import SIGKILL
except ImportError:
from signal import SIGTERM as SIGKILL
from redis import WatchError from redis import WatchError
from .compat import PY2, as_text, string_types, text_type from .compat import PY2, as_text, string_types, text_type
@ -356,7 +361,7 @@ class Worker(object):
signal.signal(signal.SIGINT, self.request_stop) signal.signal(signal.SIGINT, self.request_stop)
signal.signal(signal.SIGTERM, self.request_stop) signal.signal(signal.SIGTERM, self.request_stop)
def kill_horse(self, sig=signal.SIGKILL): def kill_horse(self, sig=SIGKILL):
""" """
Kill the horse but catch "No such process" error has the horse could already be dead. Kill the horse but catch "No such process" error has the horse could already be dead.
""" """

Loading…
Cancel
Save