fix: Don't init site if already init-ed during truncate (#25033)
This commit is contained in:
parent
0b3061e904
commit
a19fd6a8b9
1 changed files with 1 additions and 1 deletions
|
|
@ -568,7 +568,7 @@ def truncate_failed_registry(job, connection, type, value, traceback):
|
|||
"""Ensures that number of failed jobs don't exceed specified limits."""
|
||||
from frappe.utils import create_batch
|
||||
|
||||
conf = frappe.get_conf(site=job.kwargs.get("site"))
|
||||
conf = frappe.conf if frappe.conf else frappe.get_conf(site=job.kwargs.get("site"))
|
||||
limit = (conf.get("rq_failed_jobs_limit") or RQ_FAILED_JOBS_LIMIT) - 1
|
||||
|
||||
for queue in get_queues(connection=connection):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue