Skip to content

Commit

Permalink
Merge pull request #555 from fatkodima/sidekiq-integration
Browse files Browse the repository at this point in the history
Add sidekiq swarm integration
  • Loading branch information
danmayer authored Oct 11, 2024
2 parents 6d695eb + a3637de commit 0cd5726
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/coverband.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions lib/coverband/integrations/sidekiq_swarm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

Sidekiq.configure_server do |config|
config.on(:fork) do
Coverband.start
Coverband.runtime_coverage!
end
end

0 comments on commit 0cd5726

Please sign in to comment.