Sha256: dc3ddab804648f9beda7aff76fa1d074c9cd00abc447d8c1d5f089b27adbc56a

Contents?: true

Size: 530 Bytes

Versions: 64

Compression:

Stored size: 530 Bytes

Contents

# Hook into sidekiq to control the current mode

# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2021

$sidekiq_mode = :client
class << Sidekiq
  def server?
    $sidekiq_mode == :server
  end
end

# Configure redis for sidekiq client
Sidekiq.configure_client do |config|
  config.redis = { url: ENV['REDIS_URL'] }
end

# Configure redis for sidekiq worker
$sidekiq_mode = :server
::Sidekiq.configure_server do |config|
  config.redis = { url: ENV['REDIS_URL'] }
end
$sidekiq_mode = :client

require_relative 'worker'

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
instana-1.217.1 test/support/apps/sidekiq/boot.rb
instana-1.217.0 test/support/apps/sidekiq/boot.rb
instana-1.216.0 test/support/apps/sidekiq/boot.rb
instana-1.215.1 test/support/apps/sidekiq/boot.rb
instana-1.215.0 test/support/apps/sidekiq/boot.rb
instana-1.214.4 test/support/apps/sidekiq/boot.rb
instana-1.214.3 test/support/apps/sidekiq/boot.rb
instana-1.214.2 test/support/apps/sidekiq/boot.rb
instana-1.214.1 test/support/apps/sidekiq/boot.rb
instana-1.214.0 test/support/apps/sidekiq/boot.rb
instana-1.213.3 test/support/apps/sidekiq/boot.rb
instana-1.213.2 test/support/apps/sidekiq/boot.rb
instana-1.213.1 test/support/apps/sidekiq/boot.rb
instana-1.213.0 test/support/apps/sidekiq/boot.rb
instana-1.212.0 test/support/apps/sidekiq/boot.rb
instana-1.211.0 test/support/apps/sidekiq/boot.rb
instana-1.210.1 test/support/apps/sidekiq/boot.rb
instana-1.210.0 test/support/apps/sidekiq/boot.rb
instana-1.209.8 test/support/apps/sidekiq/boot.rb
instana-1.209.7 test/support/apps/sidekiq/boot.rb