mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-09 14:25:25 -05:00
A graph that processes tens of thousands of nodes will cripple the system since the API tries to load all of them and dump them into the browser. The scope of this change is to avoid such an issue by only returning the last 1000 node executions. ### Changes 🏗️ * Return only 1000 node executions from `AgentNodeExecutions` reference. * Unify the include clause for fetching `AgentNodeExecutions` in one place and its format. * Fix & optimize `cancel_execution` logic to always set both the graph & node execution status in batch. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Execute a graph in a loop that executes 10000 nodes, it should only display the last 1000 nodes when refreshed. Cancelling the graph should also not cripple the server.