test: cover ai platform demo workflow

This commit is contained in:
hailin
2026-07-14 14:11:31 +08:00
parent d08dda723c
commit 77def70983
6 changed files with 142 additions and 3 deletions

View File

@@ -33,6 +33,15 @@ def execute_agent_run(self, run_id: int) -> None:
"finished_at",
]
)
OperationAuditLog.objects.create(
user=run.created_by,
module="agents",
action="run_finished",
target_type="agent_run",
target_id=str(run.public_id),
request_snapshot={"status": "timed_out"},
result="timed_out",
)
@shared_task(name="apps.agents.tasks.cleanup_expired_agent_runs")