Merged in feat/warmup-cache-function (pull request #1581)
Feat/warmup cache function * WIP * Fix warmup for all languages * Cleanup * Added env flag so we can disable warmup * Changed time to 04.00 UTC since backend updates their data at 03.00 UTC * Add return statements * Merge branch 'master' into feat/warmup-cache-function Approved-by: Anton Gunnarsson
This commit is contained in:
8
apps/scandic-web/env/server.ts
vendored
8
apps/scandic-web/env/server.ts
vendored
@@ -192,6 +192,13 @@ export const env = createEnv({
|
||||
? z.string()
|
||||
: z.string().optional().default("dev"),
|
||||
GIT_SHA: z.string().optional(),
|
||||
ENABLE_WARMUP_HOTEL: z
|
||||
.string()
|
||||
// only allow "true" or "false"
|
||||
.refine((s) => s === "true" || s === "false")
|
||||
// transform to boolean
|
||||
.transform((s) => s === "true")
|
||||
.default("true"),
|
||||
},
|
||||
emptyStringAsUndefined: true,
|
||||
runtimeEnv: {
|
||||
@@ -285,6 +292,7 @@ export const env = createEnv({
|
||||
REDIS_API_KEY: process.env.REDIS_API_KEY,
|
||||
BRANCH: process.env.BRANCH,
|
||||
GIT_SHA: process.env.GIT_SHA,
|
||||
ENABLE_WARMUP_HOTEL: process.env.ENABLE_WARMUP_HOTEL,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user