saas: new rate limit policy

This commit is contained in:
Yanlong Wang 2025-05-07 20:46:33 +08:00
parent a9fe036ddc
commit a3412ef180
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37
3 changed files with 5 additions and 5 deletions

View File

@ -285,11 +285,11 @@ export class CrawlerHost extends RPCHost {
const rateLimitPolicy = auth.getRateLimits('CRAWL') || [ const rateLimitPolicy = auth.getRateLimits('CRAWL') || [
parseInt(user.metadata?.speed_level) >= 2 ? parseInt(user.metadata?.speed_level) >= 2 ?
RateLimitDesc.from({ RateLimitDesc.from({
occurrence: 2000, occurrence: 5000,
periodSeconds: 60 periodSeconds: 60
}) : }) :
RateLimitDesc.from({ RateLimitDesc.from({
occurrence: 200, occurrence: 500,
periodSeconds: 60 periodSeconds: 60
}) })
]; ];

View File

@ -200,11 +200,11 @@ export class SearcherHost extends RPCHost {
const rateLimitPolicy = auth.getRateLimits(rpcReflect.name.toUpperCase()) || [ const rateLimitPolicy = auth.getRateLimits(rpcReflect.name.toUpperCase()) || [
parseInt(user.metadata?.speed_level) >= 2 ? parseInt(user.metadata?.speed_level) >= 2 ?
RateLimitDesc.from({ RateLimitDesc.from({
occurrence: 400, occurrence: 1000,
periodSeconds: 60 periodSeconds: 60
}) : }) :
RateLimitDesc.from({ RateLimitDesc.from({
occurrence: 40, occurrence: 100,
periodSeconds: 60 periodSeconds: 60
}) })
]; ];

@ -1 +1 @@
Subproject commit 69808307131d4fbd8ef0026f5d2dcb90ebdfad8c Subproject commit 02279d88bc3940a08a92cb18cf8877d57cb49b82