Sha256: daf15b3b3fabd695fefe5f870c8c4f74442d3dab63b57d2a27e21e24143f966c

Contents?: true

Size: 796 Bytes

Versions: 3

Compression:

Stored size: 796 Bytes

Contents

require "active_support/core_ext/numeric/time"
require "sidekiq"
require "sidekiq-status"
require "sidekiq-merger"
require_relative "./some_worker"
require_relative "./unique_worker"

expiration = 30.minutes

Sidekiq.configure_client do |config|
  config.redis = { url: "redis://#{ENV["REDIS_HOST"]}:#{ENV["REDIS_PORT"]}" }
  config.client_middleware do |chain|
    chain.add Sidekiq::Status::ClientMiddleware, expiration: expiration
  end
end

Sidekiq.configure_server do |config|
  config.redis = { url: "redis://#{ENV["REDIS_HOST"]}:#{ENV["REDIS_PORT"]}" }
  config.server_middleware do |chain|
    chain.add Sidekiq::Status::ServerMiddleware, expiration: expiration
  end
  config.client_middleware do |chain|
    chain.add Sidekiq::Status::ClientMiddleware, expiration: expiration
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sidekiq-merger-0.0.6 app/sidekiq.rb
sidekiq-merger-0.0.5 app/sidekiq.rb
sidekiq-merger-0.0.4 app/sidekiq.rb