Sha256: 7830ff4bbf3d0db1e08e7247adbfc2c1d400b6452b75f3337b636b6feb61c692

Contents?: true

Size: 308 Bytes

Versions: 3

Compression:

Stored size: 308 Bytes

Contents

module Sidekiq
  module Middleware
    module Server
      class Transaction
        def initialize(settings)
          @connection = settings.fetch(:connection)
        end

        def call(*args)
          @connection.transaction do
            yield
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sequel_transaction-0.2.2 lib/sequel_transaction/sidekiq/middleware/server/transaction.rb
sequel_transaction-0.2.1 lib/sequel_transaction/sidekiq/middleware/server/transaction.rb
sequel_transaction-0.2.0 lib/sequel_transaction/sidekiq/middleware/server/transaction.rb