Sha256: c5ed9d0cf0886f133481bc4c13b084cb9a522860b6e64b7a59e193d620497439

Contents?: true

Size: 449 Bytes

Versions: 1

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

require 'sidekiq'
require 'hiredis'

redis_config = {
  url: ENV.fetch('REDIS_URL') { 'redis://localhost:6379/0' },
  driver: 'hiredis'
}

Sidekiq.configure_client do |config|
  config.redis = redis_config.dup
end

Sidekiq.configure_server do |config|
  config.redis = redis_config.dup
  config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
end

ActiveJob::Base.queue_adapter = :sidekiq if defined?(ActiveJob)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eivo-rails-sidekiq-0.1.0 config/initializers/sidekiq.rb