nomagick commited on
Commit
a3412ef
·
unverified ·
1 Parent(s): a9fe036

saas: new rate limit policy

Browse files
Files changed (3) hide show
  1. src/api/crawler.ts +2 -2
  2. src/api/searcher.ts +2 -2
  3. thinapps-shared +1 -1
src/api/crawler.ts CHANGED
@@ -285,11 +285,11 @@ export class CrawlerHost extends RPCHost {
285
  const rateLimitPolicy = auth.getRateLimits('CRAWL') || [
286
  parseInt(user.metadata?.speed_level) >= 2 ?
287
  RateLimitDesc.from({
288
- occurrence: 2000,
289
  periodSeconds: 60
290
  }) :
291
  RateLimitDesc.from({
292
- occurrence: 200,
293
  periodSeconds: 60
294
  })
295
  ];
 
285
  const rateLimitPolicy = auth.getRateLimits('CRAWL') || [
286
  parseInt(user.metadata?.speed_level) >= 2 ?
287
  RateLimitDesc.from({
288
+ occurrence: 5000,
289
  periodSeconds: 60
290
  }) :
291
  RateLimitDesc.from({
292
+ occurrence: 500,
293
  periodSeconds: 60
294
  })
295
  ];
src/api/searcher.ts CHANGED
@@ -200,11 +200,11 @@ export class SearcherHost extends RPCHost {
200
  const rateLimitPolicy = auth.getRateLimits(rpcReflect.name.toUpperCase()) || [
201
  parseInt(user.metadata?.speed_level) >= 2 ?
202
  RateLimitDesc.from({
203
- occurrence: 400,
204
  periodSeconds: 60
205
  }) :
206
  RateLimitDesc.from({
207
- occurrence: 40,
208
  periodSeconds: 60
209
  })
210
  ];
 
200
  const rateLimitPolicy = auth.getRateLimits(rpcReflect.name.toUpperCase()) || [
201
  parseInt(user.metadata?.speed_level) >= 2 ?
202
  RateLimitDesc.from({
203
+ occurrence: 1000,
204
  periodSeconds: 60
205
  }) :
206
  RateLimitDesc.from({
207
+ occurrence: 100,
208
  periodSeconds: 60
209
  })
210
  ];
thinapps-shared CHANGED
@@ -1 +1 @@
1
- Subproject commit 69808307131d4fbd8ef0026f5d2dcb90ebdfad8c
 
1
+ Subproject commit 02279d88bc3940a08a92cb18cf8877d57cb49b82