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.209.6 test/support/apps/sidekiq/boot.rb
instana-1.209.5 test/support/apps/sidekiq/boot.rb
instana-1.209.4 test/support/apps/sidekiq/boot.rb
instana-1.209.3 test/support/apps/sidekiq/boot.rb
instana-1.209.2 test/support/apps/sidekiq/boot.rb
instana-1.209.1 test/support/apps/sidekiq/boot.rb
instana-1.209.0.pre3 test/support/apps/sidekiq/boot.rb
instana-1.209.0.pre2 test/support/apps/sidekiq/boot.rb
instana-1.209.0.pre1 test/support/apps/sidekiq/boot.rb
instana-1.208.0 test/support/apps/sidekiq/boot.rb
instana-1.207.0 test/support/apps/sidekiq/boot.rb
instana-1.206.0 test/support/apps/sidekiq/boot.rb
instana-1.205.0 test/support/apps/sidekiq/boot.rb
instana-1.204.0 test/support/apps/sidekiq/boot.rb
instana-1.204.0.pre3 test/support/apps/sidekiq/boot.rb
instana-1.204.0.pre2 test/support/apps/sidekiq/boot.rb
instana-1.204.0.pre1 test/support/apps/sidekiq/boot.rb
instana-1.203.2 test/support/apps/sidekiq/boot.rb
instana-1.203.1 test/support/apps/sidekiq/boot.rb
instana-1.203.0 test/support/apps/sidekiq/boot.rb