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

Support for zmpop and bzmpop commands #33

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Support for zmpop and bzmpop commands #33

merged 1 commit into from
Aug 15, 2024

Conversation

72squared
Copy link
Collaborator

No description provided.

@72squared
Copy link
Collaborator Author

Partially addresses issue #31

*/
def bzPopMax(timeout: Long, keys: K*): Future[Option[ScoreWithKeyValue[K,V]]]
def bzPopMin(timeout: FiniteDuration, keys: K*): Future[Option[ScoreWithKeyValue[K,V]]]
Copy link
Collaborator Author

@72squared 72squared Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I switched all the sorted set commands from specifying timeouts for blocking operations from longs and doubles to FiniteDuration. much clearer about intent and more consistent with how other Arugula commands are implemented.

@72squared 72squared self-assigned this Aug 14, 2024
@@ -401,4 +423,11 @@ object RedisSortedSetAsyncCommands {
final case class ScoreWithKeyValue[K, V](score: Double, key: K, value: V)
final case class ZRange[T](start: T, end: T)
final case class RangeLimit(offset: Long, count: Long)

sealed trait SortOrder
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know what to call this enum. Direction didn't seem quite right to me.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SortPriority maybe ? Anyway, SortOrder works fine too!

Copy link
Owner

@scoquelin scoquelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way more explicit with Duration 👍 Thanks !

@72squared 72squared merged commit 145cce5 into main Aug 15, 2024
3 checks passed
@72squared 72squared deleted the jl-zmpop branch September 4, 2024 18:16
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

Successfully merging this pull request may close these issues.

2 participants