diff --git a/frappe/utils/background_jobs.py b/frappe/utils/background_jobs.py index 694195a438..27710cef8e 100755 --- a/frappe/utils/background_jobs.py +++ b/frappe/utils/background_jobs.py @@ -1,6 +1,7 @@ from __future__ import unicode_literals, print_function import redis from rq import Connection, Queue, Worker +from rq.logutils import setup_loghandlers from frappe.utils import cstr from collections import defaultdict import frappe @@ -102,6 +103,9 @@ def start_worker(queue=None): # empty init is required to get redis_queue from common_site_config.json redis_connection = get_redis_conn() + if os.environ.get('CI'): + setup_loghandlers('ERROR') + with Connection(redis_connection): queues = get_queue_list(queue) Worker(queues, name=get_worker_name(queue)).work()