Sha256: 86e626a382f3f9423fb82e0ae1cb729fe2f578ff9e81ccd9c2e48a2e9bb8d466

Contents?: true

Size: 326 Bytes

Versions: 23

Compression:

Stored size: 326 Bytes

Contents

module Sentry
  class BackgroundWorker
    def perform(&block)
      @executor.post do
        # make sure the background worker returns AR connection if it accidentally acquire one during serialization
        ActiveRecord::Base.connection_pool.with_connection do
          block.call
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
sentry-rails-4.8.0 lib/sentry/rails/background_worker.rb
sentry-rails-4.7.3 lib/sentry/rails/background_worker.rb
sentry-rails-4.7.2 lib/sentry/rails/background_worker.rb
sentry-rails-4.7.1 lib/sentry/rails/background_worker.rb
sentry-rails-4.7.0 lib/sentry/rails/background_worker.rb
sentry-rails-4.6.5 lib/sentry/rails/background_worker.rb
sentry-rails-4.6.4 lib/sentry/rails/background_worker.rb
sentry-rails-4.6.3 lib/sentry/rails/background_worker.rb
sentry-rails-4.6.2 lib/sentry/rails/background_worker.rb
sentry-rails-4.6.1 lib/sentry/rails/background_worker.rb
sentry-rails-4.6.0 lib/sentry/rails/background_worker.rb
sentry-rails-4.6.0.pre.beta.0 lib/sentry/rails/background_worker.rb
sentry-rails-4.5.2 lib/sentry/rails/background_worker.rb
sentry-rails-4.5.1 lib/sentry/rails/background_worker.rb
sentry-rails-4.5.0 lib/sentry/rails/background_worker.rb
sentry-rails-4.5.0.pre.beta.1 lib/sentry/rails/background_worker.rb
sentry-rails-4.4.0 lib/sentry/rails/background_worker.rb
sentry-rails-4.4.0.pre.beta.0 lib/sentry/rails/background_worker.rb
sentry-rails-4.3.4 lib/sentry/rails/background_worker.rb
sentry-rails-4.3.3 lib/sentry/rails/background_worker.rb