film42 / sidekiq-rs

A port of sidekiq to rust using tokio
MIT License
95 stars 10 forks source link

Allow RedisConnection methods to accept ToRedisArgs #40

Closed spencewenski closed 2 months ago

spencewenski commented 2 months ago

Problem

Curently, RedisConnection::zrem only accepts a single string as an argument. This means, in order to remove multiple items, the method needs to be called multiple times. Alternatively, one can use the underlying connection via RedisConnection::unnamespaced_borrow_mut, which accepts any ToRedisArgs type. However, then the key is not namespaced.

Solution

Allow RedisConnection::zrem to accept any ToRedisArgs like the other methods in RedisConnection do already.

Also updates other RedisConnection methods that only accept a single string value to accept ToRedisArgs instead.

film42 commented 2 months ago

Looks good to me! Nice!

film42 commented 2 months ago

Released as version v0.10.2. Thanks again for contributing, @spencewenski ! <3