diff --git a/app/services/run_service.py b/app/services/run_service.py index a4ade8c..adf7854 100644 --- a/app/services/run_service.py +++ b/app/services/run_service.py @@ -390,15 +390,19 @@ class RunService: task = render_effect.delay(input_list[0], recipe, output_name) # Store pending run in database for durability - await self.db.create_pending_run( - run_id=run_id, - celery_task_id=task.id, - recipe=recipe, - inputs=input_list, - actor_id=actor_id, - dag_json=dag_json, - output_name=output_name, - ) + try: + await self.db.create_pending_run( + run_id=run_id, + celery_task_id=task.id, + recipe=recipe, + inputs=input_list, + actor_id=actor_id, + dag_json=dag_json, + output_name=output_name, + ) + except Exception as e: + import logging + logging.getLogger(__name__).error(f"Failed to save pending run: {e}") # Also store in Redis for backwards compatibility (shorter TTL) task_data = json.dumps({