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

Missing blocking commands for Redis Sorted set #944

Closed
gheorghitamutu opened this issue Sep 3, 2023 · 2 comments
Closed

Missing blocking commands for Redis Sorted set #944

gheorghitamutu opened this issue Sep 3, 2023 · 2 comments

Comments

@gheorghitamutu
Copy link
Contributor

gheorghitamutu commented Sep 3, 2023

Hello,

I was looking through Sorted Set functions (wrappers over commands) in this library and I noticed that there are no blocking commands exposed for Redis Sorted Set. More specifically:

https://redis.io/commands/bzpopmin
https://redis.io/commands/bzpopmax
https://redis.io/commands/bzmpop

Are there any plans to implement these in the near future?
I also found an issue that's related to this - #476 - but there's no answer to it.

It is indeed true that one could just use:

let (key, member, score): (String, String, u64) = redis::cmd("BZPOPMIN")
            .arg(key)
            .arg(1)
            .arg(0)
            .query_async(&mut connection)
            .await?;

But I was expecting to have a wrapper similar to List blocking commands:

    fn blpop<K: ToRedisArgs>(key: K, timeout: usize) {
        cmd("BLPOP").arg(key).arg(timeout)
    }
@nihohit
Copy link
Contributor

nihohit commented Sep 7, 2023

Are there any plans to implement these in the near future?

I don't think any of the maintainers are planning on doing this, but we're always happy to accept contributions. Usually adding commands is very easy.

I also found an issue that's related to this - #476 - but there's no answer to it.

Answered there. Thanks for pointing that out.

@jaymell
Copy link
Contributor

jaymell commented Sep 8, 2023

I'm going to close this as a duplicate of #476, but please feel free to submit a PR if you'd like @gheorghitamutu.

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

3 participants