Skip to content

Commit 9cf1179

Browse files
committed
reduce sync timeout to 5mins
1 parent 2e2410a commit 9cf1179

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

AiServer.ServiceInterface/GenerationServices.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ public static async Task<GenerationResponse> ProcessSyncGenerationAsync(this Cre
299299

300300
var completedResponse = new GenerationResponse { };
301301

302-
// Wait for the job to complete max 20 minutes
303-
var timeout = DateTime.UtcNow.AddSeconds(job.Job?.TimeoutSecs ?? 20 * 60);
302+
// Wait for the job to synchronously complete, default: 5 minutes
303+
var timeout = DateTime.UtcNow.AddSeconds(job.Job?.TimeoutSecs ?? 5 * 60);
304304
while (queuedJob?.Job?.State is not (BackgroundJobState.Completed or BackgroundJobState.Cancelled
305305
or BackgroundJobState.Failed) && DateTime.UtcNow < timeout)
306306
{

AiServer.ServiceInterface/VideoServices.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ public static async Task<ArtifactGenerationResponse> ProcessSyncTransformAsync(t
374374

375375
var completedResponse = new ArtifactGenerationResponse();
376376

377-
// Wait for the job to complete max 20 minutes
378-
var timeout = DateTime.UtcNow.AddSeconds(job.Job?.TimeoutSecs ?? 20 * 60);
377+
// Wait for the job to synchronously complete, default: 5 minutes
378+
var timeout = DateTime.UtcNow.AddSeconds(job.Job?.TimeoutSecs ?? 5 * 60);
379379
while (queuedJob?.Job?.State is not (
380380
BackgroundJobState.Completed or BackgroundJobState.Cancelled or BackgroundJobState.Failed)
381381
&& DateTime.UtcNow < timeout)

0 commit comments

Comments
 (0)