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
Resolve sidekiq warning #20805
Resolve sidekiq warning #20805
Conversation
On running ./bin/startup, I noticed the warning: "WARN: `config.options[:key] = value` is deprecated, use `config[:key] = value`" pointing to forem/config/initializers/sidekiq.rb:29. This commit resolves that warning by removing `.options`
Thank you for opening this PR! We appreciate you! For all pull requests coming from third-party forks we will need to A Forem Team member will review this contribution and get back to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how did I missed this. Nice catch!
config/initializers/sidekiq.rb
Outdated
@@ -26,7 +26,7 @@ def not_past_scheduled_time?(current_time) | |||
# https://github.com/ondrejbartas/sidekiq-cron/issues/254 | |||
# Sidekiq default is 5, we don't need it quite that often but would like it more than | |||
# every 30 seconds which the gem defaults to | |||
Sidekiq.options[:poll_interval] = 10 | |||
Sidekiq[:poll_interval] = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I think it would be better with
Sidekiq[:poll_interval] = 10 | |
config[:poll_interval] = 10 |
since it's already in this block and suggested by the dep warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good callout, ty. will update.
Sidekiq is set up in the block to be referenced as "config", see: Sidekiq.configure_server do |config|
Uffizzi Preview |
What type of PR is this? (check all applicable)
Description
On running
/bin/startup
, I noticed the warning:"WARN:
config.options[:key] = value
is deprecated, useconfig[:key] = value
"pointing to forem/config/initializers/sidekiq.rb:29.
This commit resolves that warning by removing
.options
QA Instructions, Screenshots, Recordings
Run the
bin/startup
script locally fromforem/forem:main
. Notice the warning described above.Run the
bin/startup
script locally frommedwards1771/forem:resolve-sidekiq-warning-on-startup
(or just make the change on your local copy of forem). Notice the warning disappear.Added/updated tests?
We encourage you to keep the code coverage percentage at 80% and above.
ActiveRecord::NoDatabaseError
errors when attempting to run the test suite locally withbin/rspec
since I don't have the database "Forem_test" and figured it would be faster to see the test suite run via CI.