with open('/home/creserver/Desktop/Vaishno_workspace/Unified_Dashboard_Suite_Go/web/bulk-api-tester/static/js/app.js', 'r') as f: content = f.read() # 1. Remove saveLastRunToServerThrottled from updateBulkProgressUI old_progress = """ } else if (el.innerText.includes('Completed')) { el.innerText = `${bulk.completed} / ${bulk.total} Completed`; } }); this.saveLastRunToServerThrottled(); }); },""" new_progress = """ } else if (el.innerText.includes('Completed')) { el.innerText = `${bulk.completed} / ${bulk.total} Completed`; } }); // Intentionally NOT calling saveLastRunToServer here to prevent massive JSON stringify lag during execution! }); },""" content = content.replace(old_progress, new_progress) # 2. Also check if it's called in appendResultCardToDOM if 'this.saveLastRunToServer' in content.split('appendResultCardToDOM(result)')[1].split('}')[0]: print("WARNING: Found saveLastRun in appendResultCardToDOM") with open('/home/creserver/Desktop/Vaishno_workspace/Unified_Dashboard_Suite_Go/web/bulk-api-tester/static/js/app.js', 'w') as f: f.write(content) print("Applied save state throttling fix")