Skip to content

Commit

Permalink
bugfix/change configuration of base.rb and remove changes of sidekiq.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
cancelei committed Nov 7, 2024
1 parent 99c68e5 commit 73d4756
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,8 @@ doc/
# spec reports
/spec/reports
/junit.xml
<<<<<<< Updated upstream
=======

/app/assets/builds/*
!/app/assets/builds/.keep

db/backups
>>>>>>> Stashed changes
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ DEPENDENCIES
omniauth-twitter (~> 1.4)
parallel (~> 1.22)
pg (~> 1.4)
pg_query (= 4.2.3)
pg_query (~> 4.2.3)
pg_search (~> 2.3.6)
pghero (~> 3.1)
pry (~> 0.14)
Expand Down
3 changes: 2 additions & 1 deletion app/models/settings/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ def value
ActiveSupport::HashWithIndifferentAccess,
ActiveSupport::TimeWithZone,
ActiveSupport::TimeZone,
Symbol,
]
YAML.load(self[:value], permitted_classes: permitted_classes) # rubocop:disable Security/YAMLLoad
YAML.safe_load(self[:value], permitted_classes: permitted_classes, aliases: true)
end

# set the settings's value, YAML encoded
Expand Down
6 changes: 1 addition & 5 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def not_past_scheduled_time?(current_time)
sidekiq_url = ApplicationConfig["REDIS_SIDEKIQ_URL"] || ApplicationConfig["REDIS_URL"]
# On Heroku this configuration is overridden and Sidekiq will point at the redis
# instance given by the ENV variable REDIS_PROVIDER
config.redis = { url: sidekiq_url,
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } }
config.redis = { url: sidekiq_url }

config.server_middleware do |chain|
chain.add Sidekiq::HoneycombMiddleware
Expand All @@ -57,9 +56,6 @@ def not_past_scheduled_time?(current_time)
end

Sidekiq.configure_client do |config|
sidekiq_url = ApplicationConfig["REDIS_SIDEKIQ_URL"] || ApplicationConfig["REDIS_URL"]
config.redis = { url: sidekiq_url,
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } }
config.client_middleware do |chain|
chain.add SidekiqUniqueJobs::Middleware::Client
end
Expand Down

0 comments on commit 73d4756

Please sign in to comment.