mirror of https://github.com/rq/rq.git
Undo extra formatting changes
This commit is contained in:
parent
4440669f3c
commit
540be93401
30
rq/worker.py
30
rq/worker.py
|
@ -15,15 +15,20 @@ import warnings
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
|
try:
|
||||||
|
from signal import SIGKILL
|
||||||
|
except ImportError:
|
||||||
|
from signal import SIGTERM as SIGKILL
|
||||||
|
|
||||||
from redis import WatchError
|
from redis import WatchError
|
||||||
|
|
||||||
from . import worker_registration
|
from . import worker_registration
|
||||||
from .compat import PY2, as_text, string_types, text_type
|
from .compat import PY2, as_text, string_types, text_type
|
||||||
from .connections import (get_current_connection, pop_connection,
|
from .connections import get_current_connection, push_connection, pop_connection
|
||||||
push_connection)
|
|
||||||
from .defaults import (DEFAULT_JOB_MONITORING_INTERVAL,
|
from .defaults import (DEFAULT_RESULT_TTL,
|
||||||
DEFAULT_LOGGING_DATE_FORMAT, DEFAULT_LOGGING_FORMAT,
|
DEFAULT_WORKER_TTL, DEFAULT_JOB_MONITORING_INTERVAL,
|
||||||
DEFAULT_RESULT_TTL, DEFAULT_WORKER_TTL)
|
DEFAULT_LOGGING_FORMAT, DEFAULT_LOGGING_DATE_FORMAT)
|
||||||
from .exceptions import DequeueTimeout, ShutDownImminentException
|
from .exceptions import DequeueTimeout, ShutDownImminentException
|
||||||
from .job import Job, JobStatus
|
from .job import Job, JobStatus
|
||||||
from .logutils import setup_loghandlers
|
from .logutils import setup_loghandlers
|
||||||
|
@ -31,22 +36,13 @@ from .queue import Queue
|
||||||
from .registry import FailedJobRegistry, StartedJobRegistry, clean_registries
|
from .registry import FailedJobRegistry, StartedJobRegistry, clean_registries
|
||||||
from .scheduler import RQScheduler
|
from .scheduler import RQScheduler
|
||||||
from .suspension import is_suspended
|
from .suspension import is_suspended
|
||||||
from .timeouts import (HorseMonitorTimeoutException, JobTimeoutException,
|
from .timeouts import JobTimeoutException, HorseMonitorTimeoutException, UnixSignalDeathPenalty
|
||||||
UnixSignalDeathPenalty)
|
from .utils import (backend_class, ensure_list, enum,
|
||||||
from .utils import (backend_class, ensure_list, enum, make_colorizer,
|
make_colorizer, utcformat, utcnow, utcparse)
|
||||||
utcformat, utcnow, utcparse)
|
|
||||||
from .version import VERSION
|
from .version import VERSION
|
||||||
from .worker_registration import clean_worker_registry, get_keys
|
from .worker_registration import clean_worker_registry, get_keys
|
||||||
from .serializers import resolve_serializer
|
from .serializers import resolve_serializer
|
||||||
|
|
||||||
try:
|
|
||||||
from signal import SIGKILL
|
|
||||||
except ImportError:
|
|
||||||
from signal import SIGTERM as SIGKILL
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from setproctitle import setproctitle as setprocname
|
from setproctitle import setproctitle as setprocname
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
Loading…
Reference in New Issue