Feat: configurable deploy timeouts (#1519)
* make deploy timeout configurable * increase default deploy timeout to 8 minutes
This commit is contained in:
@@ -142,6 +142,10 @@ const EnvironmentSchema = z.object({
|
||||
CONTAINER_REGISTRY_PASSWORD: z.string().optional(),
|
||||
DEPLOY_REGISTRY_HOST: z.string().optional(),
|
||||
DEPLOY_REGISTRY_NAMESPACE: z.string().default("trigger"),
|
||||
DEPLOY_TIMEOUT_MS: z.coerce
|
||||
.number()
|
||||
.int()
|
||||
.default(60 * 1000 * 8), // 8 minutes
|
||||
OBJECT_STORE_BASE_URL: z.string().optional(),
|
||||
OBJECT_STORE_ACCESS_KEY_ID: z.string().optional(),
|
||||
OBJECT_STORE_SECRET_ACCESS_KEY: z.string().optional(),
|
||||
|
||||
@@ -50,7 +50,7 @@ export class IndexDeploymentService extends BaseService {
|
||||
deployment.id,
|
||||
"DEPLOYING",
|
||||
"Could not index deployment in time",
|
||||
new Date(Date.now() + 180_000)
|
||||
new Date(Date.now() + env.DEPLOY_TIMEOUT_MS)
|
||||
);
|
||||
|
||||
const responses = await socketIo.providerNamespace.timeout(30_000).emitWithAck("INDEX", {
|
||||
|
||||
@@ -64,7 +64,7 @@ export class InitializeDeploymentService extends BaseService {
|
||||
deployment.id,
|
||||
"BUILDING",
|
||||
"Building timed out",
|
||||
new Date(Date.now() + 180_000) // 3 minutes
|
||||
new Date(Date.now() + env.DEPLOY_TIMEOUT_MS)
|
||||
);
|
||||
|
||||
const imageTag = `${payload.namespace ?? env.DEPLOY_REGISTRY_NAMESPACE}/${
|
||||
|
||||
Reference in New Issue
Block a user