Merge pull request #38215 from frappe/mergify/bp/version-14-hotfix/pr-38212

refactor: update scheduled job for bulk transaction (backport #38212)
This commit is contained in:
ruthra kumar
2023-11-20 14:49:10 +05:30
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@@ -424,7 +424,7 @@ scheduler_events = {
"hourly_long": [
"erpnext.accounts.doctype.subscription.subscription.process_all",
"erpnext.stock.doctype.repost_item_valuation.repost_item_valuation.repost_entries",
"erpnext.bulk_transaction.doctype.bulk_transaction_log.bulk_transaction_log.retry_failing_transaction",
"erpnext.utilities.bulk_transaction.retry",
],
"daily": [
"erpnext.support.doctype.issue.issue.auto_close_tickets",

View File

@@ -30,7 +30,10 @@ def transaction_processing(data, from_doctype, to_doctype):
@frappe.whitelist()
def retry(date: str | None):
def retry(date: str | None = None):
if not date:
date = today()
if date:
failed_docs = frappe.db.get_all(
"Bulk Transaction Log Detail",