Skip to content

Commit

Permalink
Update schedular.py
Browse files Browse the repository at this point in the history
  • Loading branch information
maniamartial authored Jun 6, 2024
1 parent 08fc4c9 commit 7d3ee89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions burundi_compliance/burundi_compliance/utils/schedular.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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


0 comments on commit 7d3ee89

Please sign in to comment.