Add error logging for pending run creation

This commit is contained in:
gilesb
2026-01-11 21:45:29 +00:00
parent eb1de433b1
commit aacf1ceb77

View File

@@ -390,6 +390,7 @@ class RunService:
task = render_effect.delay(input_list[0], recipe, output_name) task = render_effect.delay(input_list[0], recipe, output_name)
# Store pending run in database for durability # Store pending run in database for durability
try:
await self.db.create_pending_run( await self.db.create_pending_run(
run_id=run_id, run_id=run_id,
celery_task_id=task.id, celery_task_id=task.id,
@@ -399,6 +400,9 @@ class RunService:
dag_json=dag_json, dag_json=dag_json,
output_name=output_name, 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) # Also store in Redis for backwards compatibility (shorter TTL)
task_data = json.dumps({ task_data = json.dumps({