From 8e85c04558160237d9fd1ded634a325b2d5966cf Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 16 Jul 2024 15:33:51 -0400 Subject: [PATCH] Use moving window strategy for limiter --- libretranslate/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretranslate/app.py b/libretranslate/app.py index ab7171e..4e115cc 100644 --- a/libretranslate/app.py +++ b/libretranslate/app.py @@ -239,7 +239,7 @@ 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, - strategy="fixed-window-elastic-expiry", + strategy="moving-window", ) else: from .no_limiter import Limiter