From 277ddea7b027d62df20f5cd4d3ec79a79da6ebc6 Mon Sep 17 00:00:00 2001 From: Daniel Lew Date: Fri, 5 Nov 2021 10:19:45 -0400 Subject: [PATCH] fix hours since last updated wording --- src/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.js b/src/utils.js index b05da72..038f1c5 100644 --- a/src/utils.js +++ b/src/utils.js @@ -57,7 +57,7 @@ async function getLoader({ cache, loadStateFromCache, ...options }) { return loader; } -const FORTY_EIGHT_HOURS = 1000 * 60 * 60 * 48; // ms * sec * min * hr +const ONE_HOUR = 1000 * 60 * 60; // ms * sec * min let nodeManifestWarningWasLogged; const datocmsCreateNodeManifest = ({ node, context }) => { @@ -76,8 +76,8 @@ const datocmsCreateNodeManifest = ({ node, context }) => { const nodeWasRecentlyUpdated = Date.now() - new Date(node.entityPayload.meta.updated_at).getTime() <= // Default to only create manifests for items updated in last 48 hours - (process.env.CONTENT_SYNC_DATOCMS_HOURS_SINCE_ENTRY_UPDATE || - FORTY_EIGHT_HOURS); + ((process.env.CONTENT_SYNC_DATOCMS_HOURS_SINCE_ENTRY_UPDATE || + 48) * ONE_HOUR); // We need to create manifests on cold builds, this prevents from creating many more // manifests than we actually need