From 921ac4b2a9f1b1b6264facb3c9a9fd530460adf7 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Tue, 19 Jul 2022 17:22:23 -0600 Subject: [PATCH] Fix last 3 days number --- functions/src/score-contracts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/score-contracts.ts b/functions/src/score-contracts.ts index 733f1397..57976ff2 100644 --- a/functions/src/score-contracts.ts +++ b/functions/src/score-contracts.ts @@ -14,8 +14,8 @@ const firestore = admin.firestore() async function scoreContractsInternal() { const now = Date.now() - const lastHour = now - 3600000 - const last3Days = now - 2592000000 + const lastHour = now - 60 * 60 * 1000 + const last3Days = now - 1000 * 60 * 60 * 24 * 3 const activeContractsSnap = await firestore .collection('contracts') .where('lastUpdatedTime', '>', lastHour)