Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brpoplpush function cannot accept timeout values as floats #283

Open
Liam2032 opened this issue Oct 15, 2020 · 1 comment
Open

brpoplpush function cannot accept timeout values as floats #283

Liam2032 opened this issue Oct 15, 2020 · 1 comment

Comments

@Liam2032
Copy link

Hi,
I discovered today when using the function brpoplpush, setting a timeout with a float value will result in the returned error:
timeout is negative.
I have been able to reproduce this without issue, and this error is returned only for floats and not integer types. Additionally, when using the actual Redis package, this error is not present, and timeout values of float types are permitted. Doing some investigations, the _blocking function does state in its docstring: The timeout must be an integer, and 0 means infinite., hence, it does seem there is an implicit restriction of only integers being allowed (although this goes against the original Redis package). I think this needs to be updated to better reflect the Redis package.

Cheers :)

@bmerry
Copy link
Collaborator

bmerry commented Oct 15, 2020

It looks like floating-point timeouts are a new feature in Redis 6 (see History section of https://redis.io/commands/brpoplpush). Fakeredis doesn't generally have much support for Redis 6 features, but pull requests are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants