Skip to content

Commit

Permalink
Merge pull request #6 from the-hideout/graphql-yoga
Browse files Browse the repository at this point in the history
fix use of parent process kvstore
  • Loading branch information
Razzmatazzz authored Aug 9, 2024
2 parents 9e88c24 + ea7f423 commit bb5ac7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions http/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,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();
Expand Down

0 comments on commit bb5ac7f

Please sign in to comment.