From 7b75dad479c0ff6736667b3bb537172004358991 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 16 Jul 2024 15:11:41 -0400 Subject: [PATCH] Use fixed window elastic expiry strategy for limiter --- libretranslate/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libretranslate/app.py b/libretranslate/app.py index c95700d..ab7171e 100644 --- a/libretranslate/app.py +++ b/libretranslate/app.py @@ -238,7 +238,8 @@ def create_app(args): ), storage_uri=args.req_limit_storage, 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: from .no_limiter import Limiter