From 99434aa49a5dd4eb39c15529dc0fe118f20f3399 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Fri, 6 Jun 2025 12:16:29 +0000 Subject: [PATCH] chore: only warm up cache in prod --- src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index df6170f..490ab0d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -103,4 +103,7 @@ const cacheWarmup = async () => { logger.info(`warmed up cache with ${movieIds.length} movies`, ctx); setTimeout(cacheWarmup, 3600000); // 1 hour }; -setTimeout(cacheWarmup, 10000); + +if (envIsProd()) { + setTimeout(cacheWarmup, 10000); +}