Skip to content

Commit

Permalink
fix hours since last updated wording
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSLew authored and matjack1 committed Nov 5, 2021
1 parent 8cdc921 commit 277ddea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand All @@ -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
Expand Down

0 comments on commit 277ddea

Please sign in to comment.