Преглед изворни кода

[tests] less verbose logs

version-14
Rushabh Mehta пре 8 година
родитељ
комит
7954ea453c
1 измењених фајлова са 4 додато и 0 уклоњено
  1. +4
    -0
      frappe/utils/background_jobs.py

+ 4
- 0
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()


Loading…
Откажи
Сачувај