Sha256: ff8e60f5464d709c765cf1d3d9792c0af452df9ce53f69de24517ad05ba4537a

Contents?: true

Size: 284 Bytes

Versions: 5

Compression:

Stored size: 284 Bytes

Contents

module Sentry
  class BackgroundWorker
    def _perform(&block)
      block.call
    ensure
      # make sure the background worker returns AR connection if it accidentally acquire one during serialization
      ActiveRecord::Base.connection_pool.release_connection
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sentry-rails-5.5.0 lib/sentry/rails/background_worker.rb
sentry-rails-5.4.2 lib/sentry/rails/background_worker.rb
sentry-rails-5.4.1 lib/sentry/rails/background_worker.rb
sentry-rails-5.4.0 lib/sentry/rails/background_worker.rb
sentry-rails-5.3.1 lib/sentry/rails/background_worker.rb