fix: only publish repost progress to doc subscriber (backport #36400) (#36402)

* fix: only publish repost progress to doc subscriber (#36400)

Huge size of string gets blasted to everyone on site. Due to some memory
leak (cause unknown) till sockets are open the strings are also in
process' memory.

related https://github.com/frappe/frappe/issues/21863

(cherry picked from commit c0642cf528)

# Conflicts:
#	erpnext/stock/stock_ledger.py

* chore: conflicts

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2023-07-29 18:14:51 +05:30
committed by GitHub
parent cfa07bed74
commit 32bdb7cccd

View File

@@ -288,6 +288,8 @@ def update_args_in_repost_item_valuation(
frappe.publish_realtime(
"item_reposting_progress",
{"name": doc.name, "items_to_be_repost": json.dumps(args, default=str), "current_index": index},
doctype=doc.doctype,
docname=doc.name,
)