asyncio-redis-rate-limit icon indicating copy to clipboard operation
asyncio-redis-rate-limit copied to clipboard

fix for the error - wrong number of arguments for expire command

Open raveenb opened this issue 2 years ago • 4 comments
trafficstars

I suspect this issue was due to the underlying library's api signature change

this was tested on

python v3.10, redis-stack-server c6.2.7 redis-py v4.3.5

raveenb avatar Dec 03 '22 18:12 raveenb

Sorry, you can't just remove nx, see https://redis.io/commands/expire/ I can also see this flag here: https://github.com/redis/redis-py/blob/c48dc8310717344374db6a31000e92cfe1ae35f8/redis/commands/core.py#L1643

sobolevn avatar Dec 03 '22 21:12 sobolevn

@sobolevn, I'm also experiencing this issue. Is there anything I can do to help?

skhaz avatar Sep 06 '23 14:09 skhaz

@skhaz I don't know :(

My solution was to update Redis. If you find an alternative algorithm to support older versions, please feel free to send a PR.

sobolevn avatar Sep 06 '23 14:09 sobolevn

Got it, those flags, like NX which was used, are an exclusive feature of Redis 7. Since I am using UpStash, they only support up to version 6 at the moment.

Thank you for the library, I'll use it when they release Redis 7.

skhaz avatar Sep 06 '23 16:09 skhaz