diff --git a/rq/daemon.py b/rq/daemon.py index 2c888a4..f891b63 100644 --- a/rq/daemon.py +++ b/rq/daemon.py @@ -1,4 +1,7 @@ -from logbook import Logger +try: + from logbook import Logger +except ImportError: + from logging import Logger from .worker import Worker def run_daemon(queue_keys, rv_ttl=500): diff --git a/rq/worker.py b/rq/worker.py index c7d8acd..58709d5 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -3,7 +3,10 @@ import os import random import time import procname -from logbook import Logger +try: + from logbook import Logger +except ImportError: + from logging import Logger from pickle import loads, dumps from .queue import Queue from .proxy import conn