From 7dc5d4a936a8b40791752e61508cff87eb0634f6 Mon Sep 17 00:00:00 2001 From: Yaniv Greenberg Date: Sun, 14 May 2017 11:28:59 +0300 Subject: [PATCH] local commit to avoid circular imports. --- rq/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/worker.py b/rq/worker.py index 1c3e96a..81f13e4 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -23,7 +23,6 @@ from .exceptions import DequeueTimeout, ShutDownImminentException from .job import Job, JobStatus from .logutils import setup_loghandlers from .queue import Queue, get_failed_queue -from .handlers import move_to_failed_queue from .registry import FinishedJobRegistry, StartedJobRegistry, clean_registries from .suspension import is_suspended from .timeouts import UnixSignalDeathPenalty @@ -768,6 +767,7 @@ class Worker(object): def move_to_failed_queue(self, job, *exc_info): """Default exception handler: move the job to the failed queue.""" self.log.warning('Moving job to {0!r} queue'.format(self.failed_queue.name)) + from .handlers import move_to_failed_queue move_to_failed_queue(job, *exc_info) @staticmethod