mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
Old scheduled jobs created before schedule_id was added to GraphExecutionJobArgs have schedule_id=None. When these fail validation, _handle_graph_validation_error could not unschedule them, causing them to fire repeatedly and generate ~60K+ Sentry errors (AUTOGPT-SERVER-6W2 and AUTOGPT-SERVER-6W3). Fix: Add _cleanup_old_schedules_without_id() which finds schedules for the graph but only removes those with schedule_id=None (legacy jobs). This preserves any valid newer schedules the user may have created, unlike the broader _cleanup_orphaned_schedules_for_graph() which removes all schedules for a graph.