File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ const Env = z.object({
8080 // Compute settings
8181 COMPUTE_GATEWAY_URL : z . string ( ) . url ( ) . optional ( ) ,
8282 COMPUTE_GATEWAY_AUTH_TOKEN : z . string ( ) . optional ( ) ,
83+ COMPUTE_GATEWAY_TIMEOUT_MS : z . coerce . number ( ) . int ( ) . default ( 30_000 ) ,
8384
8485 // Kubernetes settings
8586 KUBERNETES_FORCE_ENABLED : BoolEnv . default ( false ) ,
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ class ManagedSupervisor {
8383 ...workloadManagerOptions ,
8484 gatewayUrl : env . COMPUTE_GATEWAY_URL ,
8585 gatewayAuthToken : env . COMPUTE_GATEWAY_AUTH_TOKEN ,
86+ gatewayTimeoutMs : env . COMPUTE_GATEWAY_TIMEOUT_MS ,
8687 } )
8788 : this . isKubernetes
8889 ? new KubernetesWorkloadManager ( workloadManagerOptions )
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { tryCatch } from "@trigger.dev/core";
1111type ComputeWorkloadManagerOptions = WorkloadManagerOptions & {
1212 gatewayUrl : string ;
1313 gatewayAuthToken ?: string ;
14+ gatewayTimeoutMs : number ;
1415} ;
1516
1617export class ComputeWorkloadManager implements WorkloadManager {
@@ -92,7 +93,7 @@ export class ComputeWorkloadManager implements WorkloadManager {
9293 fetch ( url , {
9394 method : "POST" ,
9495 headers,
95- signal : AbortSignal . timeout ( 30_000 ) ,
96+ signal : AbortSignal . timeout ( this . opts . gatewayTimeoutMs ) ,
9697 body : JSON . stringify ( {
9798 image : imageRef ,
9899 env : envVars ,
You can’t perform that action at this time.
0 commit comments