mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-14 04:01:16 +00:00
Use fixed window elastic expiry strategy for limiter
This commit is contained in:
parent
aaff4dd588
commit
7b75dad479
1 changed files with 2 additions and 1 deletions
|
@ -238,7 +238,8 @@ def create_app(args):
|
||||||
),
|
),
|
||||||
storage_uri=args.req_limit_storage,
|
storage_uri=args.req_limit_storage,
|
||||||
default_limits_deduct_when=lambda req: True, # Force cost to be called after the request
|
default_limits_deduct_when=lambda req: True, # Force cost to be called after the request
|
||||||
default_limits_cost=limits_cost
|
default_limits_cost=limits_cost,
|
||||||
|
strategy="fixed-window-elastic-expiry",
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
from .no_limiter import Limiter
|
from .no_limiter import Limiter
|
||||||
|
|
Loading…
Reference in a new issue