mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
allow for url config for sidekiq
This commit is contained in:
parent
17fbbd8e7a
commit
6bb59ffbf2
1 changed files with 5 additions and 2 deletions
|
@ -37,12 +37,15 @@ end
|
||||||
|
|
||||||
Sidekiq::Logging.logger = nil unless ENV['RACK_ENV'] == 'production'
|
Sidekiq::Logging.logger = nil unless ENV['RACK_ENV'] == 'production'
|
||||||
|
|
||||||
|
sidekiq_redis_config = {namespace: 'neocitiesworker'}
|
||||||
|
sidekiq_redis_config[:url] = $config['sidekiq_url'] if $config['sidekiq_url']
|
||||||
|
|
||||||
Sidekiq.configure_server do |config|
|
Sidekiq.configure_server do |config|
|
||||||
config.redis = { namespace: 'neocitiesworker' }
|
config.redis = sidekiq_redis_config
|
||||||
end
|
end
|
||||||
|
|
||||||
Sidekiq.configure_client do |config|
|
Sidekiq.configure_client do |config|
|
||||||
config.redis = { namespace: 'neocitiesworker' }
|
config.redis = sidekiq_redis_config
|
||||||
end
|
end
|
||||||
|
|
||||||
require File.join(DIR_ROOT, 'workers', 'thumbnail_worker.rb')
|
require File.join(DIR_ROOT, 'workers', 'thumbnail_worker.rb')
|
||||||
|
|
Loading…
Add table
Reference in a new issue