Skip to content

Commit

Permalink
Merge pull request #532 from alphagov/disable-appsignal-when-invalida…
Browse files Browse the repository at this point in the history
…ting

Disable Appsignal monitoring when invalidating signatures
  • Loading branch information
alanth authored Aug 21, 2016
2 parents 550258f + b8c14c6 commit 4a5dbdf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/models/invalidation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,15 @@ def invalidate!
counted_at: Time.current
)

matching_signatures.find_in_batches(batch_size: 100) do |signatures|
signatures.each do |signature|
signature.invalidate!(Time.current, self)
increment!(:invalidated_count)
Appsignal.without_instrumentation do
matching_signatures.find_in_batches(batch_size: 100) do |signatures|
signatures.each do |signature|
signature.invalidate!(Time.current, self)
increment!(:invalidated_count)
end

reload and return if cancelled?
end

reload and return if cancelled?
end

update(completed_at: Time.current)
Expand Down

0 comments on commit 4a5dbdf

Please sign in to comment.