瀏覽代碼

[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…
取消
儲存