From 9ac859fc964214e5dcc2a8e8c68b7039490c0165 Mon Sep 17 00:00:00 2001 From: Raveen Beemsingh Date: Sat, 3 Dec 2022 23:48:03 +0530 Subject: [PATCH] fix for the error - wrong number of arguments for expire command --- asyncio_redis_rate_limit/compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asyncio_redis_rate_limit/compat.py b/asyncio_redis_rate_limit/compat.py index fdedb2d..0f83f0c 100644 --- a/asyncio_redis_rate_limit/compat.py +++ b/asyncio_redis_rate_limit/compat.py @@ -47,7 +47,7 @@ def pipeline_expire( ) -> AnyPipeline: """Compatibility mode for `.expire(..., nx=True)` command.""" if isinstance(pipeline, _AsyncPipeline): - return pipeline.expire(cache_key, seconds, nx=True) # type: ignore + return pipeline.expire(cache_key, seconds) # type: ignore # `aioredis` somehow does not have this boolean argument in `.expire`, # so, we use `EXPIRE` directly with `NX` flag. return pipeline.execute_command( # type: ignore