mirror of
https://github.com/taoensso/telemere.git
synced 2025-12-24 12:28:25 +00:00
[nop] Tune internal handler rate limits
This commit is contained in:
parent
d2b3e7201d
commit
1756069330
2 changed files with 4 additions and 3 deletions
|
|
@ -325,7 +325,7 @@
|
|||
>max-file-size?
|
||||
(when max-file-size
|
||||
(let [max-file-size (long max-file-size)
|
||||
rl (enc/rate-limiter-once-per 2500)]
|
||||
rl (enc/rate-limiter-once-per 250)]
|
||||
(fn [] (and (not (rl)) (> (.length main-file) max-file-size)))))
|
||||
|
||||
prev-timestamp_ (enc/latom nil) ; Initially nil
|
||||
|
|
@ -395,6 +395,7 @@
|
|||
(.setLastModified (utils/as-file "test/logs/app6.log")
|
||||
(enc/as-udt "1999-01-01T01:00:00.00Z"))
|
||||
|
||||
(let [f (utils/as-file "test/logs/app6.log")] (enc/qb 1e5 (.length f)))
|
||||
(let [hfn
|
||||
(handler:file
|
||||
{:path "test/logs/app6.log"
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@
|
|||
true))
|
||||
|
||||
file-exists!
|
||||
(let [rl (enc/rate-limiter-once-per 250)]
|
||||
(let [rl (enc/rate-limiter-once-per 100)]
|
||||
(fn []
|
||||
(or (rl) (.exists file)
|
||||
(throw (java.io.IOException. "File doesn't exist")))))
|
||||
|
|
@ -344,7 +344,7 @@
|
|||
true))
|
||||
|
||||
conn-okay!
|
||||
(let [rl (enc/rate-limiter-once-per 250)]
|
||||
(let [rl (enc/rate-limiter-once-per 100)]
|
||||
(fn []
|
||||
(or
|
||||
(rl)
|
||||
|
|
|
|||
Loading…
Reference in a new issue