Reduce server console polling load

This commit is contained in:
npc0-hue
2026-09-07 19:49:20 +08:00
parent 1b583f3ca6
commit 4ab7bb820d
10 changed files with 110 additions and 25 deletions
+4
View File
@@ -86,6 +86,10 @@ func TestCoreAPICreateListDetailWorkflows(t *testing.T) {
getJSON[dto.JobResponse](t, router, "/api/v1/jobs/job-1")
jobs := getJSON[dto.JobListResponse](t, router, "/api/v1/jobs?serverInstanceId=server-1&runEndpointId=run-local&state=queued")
assertListCount(t, jobs.Count, 1)
jobs = getJSON[dto.JobListResponse](t, router, "/api/v1/jobs?serverInstanceId=server-1&states=queued,running,failed")
assertListCount(t, jobs.Count, 1)
jobs = getJSON[dto.JobListResponse](t, router, "/api/v1/jobs?serverInstanceId=server-1&states=running,failed")
assertListCount(t, jobs.Count, 0)
artifactResponse := postJSON[dto.ArtifactResponse](t, router, "/api/v1/artifacts", dto.ArtifactCreateRequest{
ID: "artifact-1",