From ea7f42380cff8d361a0604d940a7a725d76fded7 Mon Sep 17 00:00:00 2001 From: Razzmatazz Date: Fri, 9 Aug 2024 08:18:44 -0500 Subject: [PATCH] fix use of parent process kvstore --- http/index.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/http/index.mjs b/http/index.mjs index bd574ff0..a6286a49 100644 --- a/http/index.mjs +++ b/http/index.mjs @@ -40,6 +40,8 @@ if (cluster.isPrimary && workerCount > 0) { } else { kvLoading[message.kvName] = env.DATA_CACHE.get(message.kvName, 'json'); const data = await kvLoading[message.kvName]; + kvStore[message.kvName] = data; + delete kvLoading[message.kvName]; let refreshTime = 1000 * 60 * 30; if (data?.expiration && new Date(data.expiration) > new Date()) { refreshTime = new Date(data.expiration) - new Date();