소스 검색

More aggressive token strategy to combat bursts

Zed 6 년 전
부모
커밋
2642e5efe4
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/tokens.nim

+ 2 - 2
src/tokens.nim

@@ -58,5 +58,5 @@ proc poolTokens*(amount: int) {.async.} =
 proc initTokenPool*(cfg: Config) {.async.} =
   while true:
     if tokenPool.countIt(not it.isLimited) < cfg.minTokens:
-      await poolTokens(min(3, cfg.minTokens - tokenPool.len))
-    await sleepAsync(4000)
+      await poolTokens(min(4, cfg.minTokens - tokenPool.len))
+    await sleepAsync(2000)