From a3412ef18097d2b92743add791cc9796a7aef91a Mon Sep 17 00:00:00 2001 From: Yanlong Wang Date: Wed, 7 May 2025 20:46:33 +0800 Subject: [PATCH] saas: new rate limit policy --- src/api/crawler.ts | 4 ++-- src/api/searcher.ts | 4 ++-- thinapps-shared | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/crawler.ts b/src/api/crawler.ts index c4423eb..82f427c 100644 --- a/src/api/crawler.ts +++ b/src/api/crawler.ts @@ -285,11 +285,11 @@ export class CrawlerHost extends RPCHost { const rateLimitPolicy = auth.getRateLimits('CRAWL') || [ parseInt(user.metadata?.speed_level) >= 2 ? RateLimitDesc.from({ - occurrence: 2000, + occurrence: 5000, periodSeconds: 60 }) : RateLimitDesc.from({ - occurrence: 200, + occurrence: 500, periodSeconds: 60 }) ]; diff --git a/src/api/searcher.ts b/src/api/searcher.ts index 34ba304..95fa4cc 100644 --- a/src/api/searcher.ts +++ b/src/api/searcher.ts @@ -200,11 +200,11 @@ export class SearcherHost extends RPCHost { const rateLimitPolicy = auth.getRateLimits(rpcReflect.name.toUpperCase()) || [ parseInt(user.metadata?.speed_level) >= 2 ? RateLimitDesc.from({ - occurrence: 400, + occurrence: 1000, periodSeconds: 60 }) : RateLimitDesc.from({ - occurrence: 40, + occurrence: 100, periodSeconds: 60 }) ]; diff --git a/thinapps-shared b/thinapps-shared index 6980830..02279d8 160000 --- a/thinapps-shared +++ b/thinapps-shared @@ -1 +1 @@ -Subproject commit 69808307131d4fbd8ef0026f5d2dcb90ebdfad8c +Subproject commit 02279d88bc3940a08a92cb18cf8877d57cb49b82