From be24587b3c69067758b1f9410615e96b1362d0e4 Mon Sep 17 00:00:00 2001 From: Luke Tomlinson Date: Mon, 26 Jul 2021 10:06:14 -0400 Subject: [PATCH] Use minutes for debugging --- dist/index.js | 4 ++-- src/classes/issues-processor.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 5116b243..54e2416a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -267,8 +267,8 @@ class IssuesProcessor { this._statistics = new statistics_1.Statistics(); } } - static _updatedSince(timestamp, num_days) { - const daysInMillis = 1000 * 60 * 60 * 24 * num_days; + static _updatedSince(timestamp, num_minutes) { + const daysInMillis = 1000 * 60 * num_minutes; const millisSinceLastUpdated = new Date().getTime() - new Date(timestamp).getTime(); return millisSinceLastUpdated <= daysInMillis; } diff --git a/src/classes/issues-processor.ts b/src/classes/issues-processor.ts index 384a3604..575e932a 100644 --- a/src/classes/issues-processor.ts +++ b/src/classes/issues-processor.ts @@ -29,8 +29,8 @@ import {LoggerService} from '../services/logger.service'; * Handle processing of issues for staleness/closure. */ export class IssuesProcessor { - private static _updatedSince(timestamp: string, num_days: number): boolean { - const daysInMillis = 1000 * 60 * 60 * 24 * num_days; + private static _updatedSince(timestamp: string, num_minutes: number): boolean { + const daysInMillis = 1000 * 60 * num_minutes; const millisSinceLastUpdated = new Date().getTime() - new Date(timestamp).getTime();