From 6140d954edff970a6786baf7e462501379500d61 Mon Sep 17 00:00:00 2001 From: kirinnee Date: Mon, 26 Feb 2024 22:48:21 +0800 Subject: [PATCH] fix: buffer scheduler with 1s delays --- src/lib/populator.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/populator.ts b/src/lib/populator.ts index 266373a..97bf0b2 100644 --- a/src/lib/populator.ts +++ b/src/lib/populator.ts @@ -2,6 +2,7 @@ import { Logger } from "pino"; import { SearcherBuilder } from "../domain/searcher/builder.ts"; import { addDays, differenceInDays } from "date-fns"; import { RetrieveResult } from "./interfaces.ts"; +import { __ } from "../utility.ts"; class Populator { constructor( @@ -31,6 +32,8 @@ class Populator { const j2w = await searcher.Search("JToW", currentDate); const w2j = await searcher.Search("WToJ", currentDate); + await __(1); + const j2wR = j2w.map((s) => `${s.departure_time}:00`); const w2jR = w2j.map((s) => `${s.departure_time}:00`); ret.push({