From 845e441b0a5fc5e37c334b3901a7f7d2afcae39e Mon Sep 17 00:00:00 2001 From: Yanlong Wang Date: Mon, 28 Apr 2025 15:48:20 +0800 Subject: [PATCH] fix: cache batch interval --- src/api/searcher.ts | 2 +- src/api/serp.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/searcher.ts b/src/api/searcher.ts index 387ddd4..34ba304 100644 --- a/src/api/searcher.ts +++ b/src/api/searcher.ts @@ -93,7 +93,7 @@ export class SearcherHost extends RPCHost { .catch((err) => { this.logger.warn(`Failed to cache search result in batch`, { err }); }); - }, 1000 * 60 * 10 + Math.round(1000 * Math.random())).unref(); + }, 1000 * 10 + Math.round(1000 * Math.random())).unref(); } override async init() { diff --git a/src/api/serp.ts b/src/api/serp.ts index 2779e5a..1d1e15a 100644 --- a/src/api/serp.ts +++ b/src/api/serp.ts @@ -113,7 +113,7 @@ export class SerpHost extends RPCHost { .catch((err) => { this.logger.warn(`Failed to cache search result in batch`, { err }); }); - }, 1000 * 60 * 10 + Math.round(1000 * Math.random())).unref(); + }, 1000 * 10 + Math.round(1000 * Math.random())).unref(); } override async init() {