Skip to content

Commit 0f6b0f1

Browse files
committed
Use separate timeout value for queued deployments
1 parent 3e5277d commit 0f6b0f1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

apps/webapp/app/env.server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ const EnvironmentSchema = z
312312
.number()
313313
.int()
314314
.default(60 * 1000 * 8), // 8 minutes
315+
DEPLOY_QUEUE_TIMEOUT_MS: z.coerce
316+
.number()
317+
.int()
318+
.default(60 * 1000 * 15), // 15 minutes
315319

316320
OBJECT_STORE_BASE_URL: z.string().optional(),
317321
OBJECT_STORE_ACCESS_KEY_ID: z.string().optional(),

apps/webapp/app/v3/services/initializeDeployment.server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ export class InitializeDeploymentService extends BaseService {
138138
deployment.id,
139139
deployment.status,
140140
"Building timed out",
141-
new Date(Date.now() + env.DEPLOY_TIMEOUT_MS)
141+
new Date(
142+
Date.now() + deployment.status === "PENDING"
143+
? env.DEPLOY_QUEUE_TIMEOUT_MS
144+
: env.DEPLOY_TIMEOUT_MS
145+
)
142146
);
143147

144148
return {

0 commit comments

Comments
 (0)