Sha256: 64feae34abc8579b13a97f89129db7ad4f6957d5f7cfcc43c5bd582d6c4c72f3

Contents?: true

Size: 641 Bytes

Versions: 45

Compression:

Stored size: 641 Bytes

Contents

require 'sidekiq/launcher'
require 'sidekiq/cli'
require 'sidekiq/api'
require 'sidekiq/processor'

require Dir.pwd + '/test/jobs/sidekiq_job_1.rb'
require Dir.pwd + '/test/jobs/sidekiq_job_2.rb'

::Instana.logger.info "Booting instrumented sidekiq worker for tests."
::Sidekiq.logger.level = ::Logger::FATAL

sidekiq_thread = Thread.new do
  launcher = ::Sidekiq::Launcher.new(
    ::Sidekiq.options.merge(
      queues: ['important'],
      concurrency: 2
    )
  )
  launcher.run
  Thread.current[:worker] = launcher
end

Minitest.after_run do
  ::Instana.logger.info "Killing Sidekiq worker"
  sidekiq_thread[:worker].stop
  sleep 1
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
instana-1.10.2 test/servers/sidekiq/worker.rb
instana-1.10.1-java test/servers/sidekiq/worker.rb
instana-1.10.1 test/servers/sidekiq/worker.rb
instana-1.10.0 test/servers/sidekiq/worker.rb
instana-1.10.0.slimfast test/servers/sidekiq/worker.rb