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

fix redis exists deprecation warning #335

Merged
merged 1 commit into from May 17, 2021

Conversation

Wolfer
Copy link
Contributor

@Wolfer Wolfer commented Mar 19, 2021

With redis 4.2.5 I get deprecated text at startup

Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead. To opt-in to the new behavior now you can set Redis.exists_returns_integer =  true. To disable this message and keep the current (boolean) behaviour of 'exists' you can set `Redis.exists_returns_integer = false`, but this option will be removed in 5.0. (/usr/local/rvm/gems/ruby-2.6.3/gems/sidekiq-scheduler-3.0.1/lib/sidekiq-scheduler/redis_manager.rb:99:in `block in schedule_exist?')

Method exists? was added recently and most likely will not be available to everyone(https://github.com/redis/redis-rb/blame/master/lib/redis.rb#L601)

@coveralls
Copy link

coveralls commented Mar 19, 2021

Coverage Status

Coverage decreased (-0.1%) to 97.86% when pulling 8421e5c on Wolfer:patch-1 into 41990aa on moove-it:master.

@weilandia
Copy link

`Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead. To opt-in to the new behavior now you can set Redis.exists_returns_integer =  true. To disable this message and keep the current (boolean) behaviour of 'exists' you can set `Redis.exists_returns_integer = false`, but this option will be removed in 5.0.
@Wolfer
Copy link
Contributor Author

Wolfer commented May 13, 2021

@marcelolx
Copy link
Member

@Wolfer Soon as possible I'll take a look on this, the tests are broken but this is already fixed here #339

Copy link
Contributor

@elpic elpic left a comment

Choose a reason for hiding this comment

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

LGTM

@marcelolx marcelolx merged commit 24780e3 into sidekiq-scheduler:master May 17, 2021
@marcelolx
Copy link
Member

Thanks @Wolfer

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.

None yet

5 participants