move ShutDownImminentException into exceptions.py

main
Samuel Colvin 9 years ago
parent 0e26db9e08
commit 7efd036a2c

@ -19,3 +19,9 @@ class UnpickleError(Exception):
class DequeueTimeout(Exception): class DequeueTimeout(Exception):
pass pass
class ShutDownImminentException(Exception):
def __init__(self, msg, extra_info):
self.extra_info = extra_info
super(ShutDownImminentException, self).__init__(msg)

@ -18,7 +18,7 @@ from rq.compat import as_text, string_types, text_type
from .connections import get_current_connection, push_connection, pop_connection from .connections import get_current_connection, push_connection, pop_connection
from .defaults import DEFAULT_RESULT_TTL, DEFAULT_WORKER_TTL from .defaults import DEFAULT_RESULT_TTL, DEFAULT_WORKER_TTL
from .exceptions import DequeueTimeout 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
from .queue import Queue, get_failed_queue from .queue import Queue, get_failed_queue
@ -722,12 +722,6 @@ class SimpleWorker(Worker):
return self.perform_job(*args, **kwargs) return self.perform_job(*args, **kwargs)
class ShutDownImminentException(Exception):
def __init__(self, msg, extra_info):
self.extra_info = extra_info
super(ShutDownImminentException, self).__init__(msg)
class HerokuWorker(Worker): class HerokuWorker(Worker):
""" """
Modified version of rq worker which: Modified version of rq worker which:

Loading…
Cancel
Save