Skip to content

Commit e01288d

Browse files
committed
Added VALKEY_ env vars and plugged them into the run engine
1 parent fb56932 commit e01288d

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

apps/webapp/app/env.server.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,33 @@ const EnvironmentSchema = z.object({
8484
REDIS_PASSWORD: z.string().optional(),
8585
REDIS_TLS_DISABLED: z.string().optional(),
8686

87+
// Valkey options (used in Run Engine 2.0+)
88+
VALKEY_HOST: z
89+
.string()
90+
.nullish()
91+
.default(process.env.REDIS_HOST ?? null),
92+
VALKEY_READER_HOST: z
93+
.string()
94+
.nullish()
95+
.default(process.env.REDIS_READER_HOST ?? null),
96+
VALKEY_READER_PORT: z.coerce
97+
.number()
98+
.nullish()
99+
.default(process.env.REDIS_READER_PORT ? parseInt(process.env.REDIS_READER_PORT) : null),
100+
VALKEY_PORT: z.coerce
101+
.number()
102+
.nullish()
103+
.default(process.env.REDIS_PORT ? parseInt(process.env.REDIS_PORT) : null),
104+
VALKEY_USERNAME: z
105+
.string()
106+
.nullish()
107+
.default(process.env.REDIS_USERNAME ?? null),
108+
VALKEY_PASSWORD: z
109+
.string()
110+
.nullish()
111+
.default(process.env.REDIS_PASSWORD ?? null),
112+
VALKEY_TLS_DISABLED: z.string().default(process.env.REDIS_TLS_DISABLED ?? "false"),
113+
87114
DEFAULT_ENV_EXECUTION_CONCURRENCY_LIMIT: z.coerce.number().int().default(10),
88115
DEFAULT_ORG_EXECUTION_CONCURRENCY_LIMIT: z.coerce.number().int().default(10),
89116
DEFAULT_DEV_ENV_EXECUTION_ATTEMPTS: z.coerce.number().int().positive().default(1),

apps/webapp/app/v3/runEngine.server.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ function createRunEngine() {
1414
const engine = new RunEngine({
1515
prisma,
1616
redis: {
17-
port: env.REDIS_PORT,
18-
host: env.REDIS_HOST,
19-
username: env.REDIS_USERNAME,
20-
password: env.REDIS_PASSWORD,
17+
port: env.VALKEY_PORT ?? undefined,
18+
host: env.VALKEY_HOST ?? undefined,
19+
username: env.VALKEY_USERNAME ?? undefined,
20+
password: env.VALKEY_PASSWORD ?? undefined,
2121
enableAutoPipelining: true,
22-
...(env.REDIS_TLS_DISABLED === "true" ? {} : { tls: {} }),
22+
...(env.VALKEY_TLS_DISABLED === "true" ? {} : { tls: {} }),
2323
},
2424
worker: {
2525
workers: env.RUN_ENGINE_WORKER_COUNT,

0 commit comments

Comments
 (0)