1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Prepare for upcoming Sidekiq Configuration design

Reference commit: 67daa7a408

While the docs[1] suggests to use Sidekiq::Config, but it is not
available yet. So uses Sidekiq instead to make activejob integration
tests work.

[1]https://github.com/mperham/sidekiq/blob/main/docs/global_to_local.md#explicit-configuration
This commit is contained in:
Juanito Fatas 2022-06-09 23:28:33 +09:00
parent 21e529bdcf
commit 6e6e2b9457

View file

@ -53,10 +53,12 @@ module SidekiqJobsManager
require "sidekiq/cli"
require "sidekiq/launcher"
sidekiq = Sidekiq::Launcher.new(queues: ["integration_tests"],
environment: "test",
concurrency: 1,
timeout: 1)
config = Sidekiq
config[:queues] = ["integration_tests"]
config[:environment] = "test"
config[:concurrency] = 1
config[:timeout] = 1
sidekiq = Sidekiq::Launcher.new(config)
Sidekiq.average_scheduled_poll_interval = 0.5
Sidekiq.options[:poll_interval_average] = 1
begin