From 7954ea453c00e749eb46d131c178feb6cb468585 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 10 Aug 2017 11:50:22 +0530 Subject: [PATCH] [tests] less verbose logs --- frappe/utils/background_jobs.py | 4 ++++ 1 file changed, 4 insertions(+) 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()