diff --git a/backend/workflow_executor.py b/backend/workflow_executor.py index 6ad0c94..0677e05 100644 --- a/backend/workflow_executor.py +++ b/backend/workflow_executor.py @@ -880,6 +880,11 @@ def save_execution_state( INSERT INTO workflow_executions (id, workflow_id, profile_id, status, node_states, execution_log, started_at, completed_at) VALUES (%s, %s, %s, %s, %s, %s, %s, %s) + ON CONFLICT (id) DO UPDATE SET + status = EXCLUDED.status, + node_states = EXCLUDED.node_states, + execution_log = EXCLUDED.execution_log, + completed_at = EXCLUDED.completed_at """, ( execution_id, workflow_id,