瀏覽代碼

fix: allow custom queues (backport #15653) (#15667)

* fix: allow custom queues

(cherry picked from commit ab7077dd31)

* fix: remove site config and reformat the code

(cherry picked from commit b3e11c01ee)

* fix: remove redundant code

(cherry picked from commit 51ae9a57fd)

Co-authored-by: Lucas Vazquez <lucas5zvazquez@gmail.com>
version-14
mergify[bot] 3 年之前
committed by GitHub
父節點
當前提交
a053e8b33c
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. +9
    -3
      frappe/utils/background_jobs.py

+ 9
- 3
frappe/utils/background_jobs.py 查看文件

@@ -20,11 +20,17 @@ from frappe.utils.redis_queue import RedisQueue
from frappe.utils.commands import log


common_site_config = frappe.get_file_json("common_site_config.json")
custom_workers_config = common_site_config.get("workers", {})
default_timeout = 300
queue_timeout = {
'long': 1500,
'default': 300,
'short': 300
"default": default_timeout,
"short": default_timeout,
"long": 1500,
**{
worker: config.get("timeout", default_timeout)
for worker, config in custom_workers_config.items()
}
}

redis_connection = None


Loading…
取消
儲存