Sfoglia il codice sorgente

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 anni fa
committed by GitHub
parent
commit
a053e8b33c
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 9 aggiunte e 3 eliminazioni
  1. +9
    -3
      frappe/utils/background_jobs.py

+ 9
- 3
frappe/utils/background_jobs.py Vedi File

@@ -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


Caricamento…
Annulla
Salva