diff --git a/lib/caching.js b/lib/caching.js index 33e856f..7e8f0af 100644 --- a/lib/caching.js +++ b/lib/caching.js @@ -49,9 +49,14 @@ const createCache = async (opt = {}) => { // const timePassed = Math.round(performance.now() - t0) } + const stop = async () => { + await redis.quit() + } + return { get, put, + stop, } } diff --git a/lib/match-with-schedule-trip.js b/lib/match-with-schedule-trip.js index 7228323..52edaab 100644 --- a/lib/match-with-schedule-trip.js +++ b/lib/match-with-schedule-trip.js @@ -691,6 +691,7 @@ const createMatchGtfsRtTripUpdateWithScheduleStopTimes = async (cfg, opt = {}) = const stop = async () => { await pg.end() await stopQueryingStationWeight() + await cache.stop() } return {