diff --git a/lib/coverband.rb b/lib/coverband.rb index f7b82289..f544986c 100644 --- a/lib/coverband.rb +++ b/lib/coverband.rb @@ -117,6 +117,7 @@ def self.runtime_coverage! start end require "coverband/integrations/resque" if defined? ::Resque + require "coverband/integrations/sidekiq_swarm" if defined? ::Sidekiq::Enterprise::Swarm rescue Redis::CannotConnectError => error Coverband.configuration.logger.info "Redis is not available (#{error}), Coverband not configured" Coverband.configuration.logger.info "If this is a setup task like assets:precompile feel free to ignore" diff --git a/lib/coverband/integrations/sidekiq_swarm.rb b/lib/coverband/integrations/sidekiq_swarm.rb new file mode 100644 index 00000000..0b2ba549 --- /dev/null +++ b/lib/coverband/integrations/sidekiq_swarm.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +Sidekiq.configure_server do |config| + config.on(:fork) do + Coverband.start + Coverband.runtime_coverage! + end +end