From 5a226a8395d1d6c51917ee06584c6bfd0467cb16 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Fri, 1 Sep 2023 12:36:40 +0530 Subject: [PATCH] fix: reduce threshold for bg job fn (cherry picked from commit b6e6f2ef8da1c89fd3105066f0ded7406bb0f31c) --- .../doctype/period_closing_voucher/period_closing_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 49472484ef44..af1c06643a1c 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -126,7 +126,7 @@ def check_if_previous_year_closed(self): def make_gl_entries(self, get_opening_entries=False): gl_entries = self.get_gl_entries() closing_entries = self.get_grouped_gl_entries(get_opening_entries=get_opening_entries) - if len(gl_entries) > 5000: + if len(gl_entries + closing_entries) > 3000: frappe.enqueue( process_gl_entries, gl_entries=gl_entries,