From 7d3ee897a46b36716c46ff7c9619fccda346f65e Mon Sep 17 00:00:00 2001 From: Joseph Mania <60258622+maniamartial@users.noreply.github.com> Date: Thu, 6 Jun 2024 21:41:55 +0300 Subject: [PATCH] Update schedular.py --- burundi_compliance/burundi_compliance/utils/schedular.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/burundi_compliance/burundi_compliance/utils/schedular.py b/burundi_compliance/burundi_compliance/utils/schedular.py index 90495ac..9d3badb 100644 --- a/burundi_compliance/burundi_compliance/utils/schedular.py +++ b/burundi_compliance/burundi_compliance/utils/schedular.py @@ -33,7 +33,7 @@ def check_and_send_pending_stock_ledger_entry(): for stock_ledger_entry in stock_ledger_entries: try: - time.sleep(3) + stock_ledger_entry_doc = frappe.get_doc("Stock Ledger Entry", stock_ledger_entry.name) if stock_ledger_entry_doc.voucher_type == "Stock Reconciliation" and stock_ledger_entry_doc.has_batch_no == 1 and stock_ledger_entry_doc.actual_qty < 0: continue @@ -42,7 +42,7 @@ def check_and_send_pending_stock_ledger_entry(): continue # frappe.publish_realtime("msgpring",f'{stock_ledger_entry_doc}', user=frappe.session.user) send_data(stock_ledger_entry_doc) - + time.sleep(2) except Exception as e: frappe.log_error(frappe.get_traceback(), "Error in sending stock ledger entry {0}".format(stock_ledger_entry.name)) continue @@ -60,4 +60,4 @@ def check_and_send_pending_sales_invoices(): except Exception as e: frappe.log_error(frappe.get_traceback(), "Error in sending sales invoice {0}".format(sales_invoice.name)) continue - \ No newline at end of file +