From 4758d566daea61572a464617a8523bf0fba05bca Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Tue, 1 Jul 2025 21:47:15 -0400 Subject: [PATCH] Add constant MAX_NUM_ENTRIES and adjust PARKING_LOGGING_INTERVAL_MS --- src/repositories/InMemoryParkingRepository.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/repositories/InMemoryParkingRepository.ts b/src/repositories/InMemoryParkingRepository.ts index db0e543..96488b8 100644 --- a/src/repositories/InMemoryParkingRepository.ts +++ b/src/repositories/InMemoryParkingRepository.ts @@ -7,7 +7,12 @@ import { HistoricalParkingAverageQueryResult } from "./ParkingGetterRepository"; type ParkingStructureID = string; -export const PARKING_LOGGING_INTERVAL_MS = 60000; +// Every 10 minutes +// 6x per hour * 24x per day * 7x per week = 1008 entries for one week +export const PARKING_LOGGING_INTERVAL_MS = 600000; + +// This will last two weeks +export const MAX_NUM_ENTRIES = 2016; export class InMemoryParkingRepository implements ParkingGetterSetterRepository { private dataLastAdded: Map = new Map();