Sha256: 46749b49b84053393b8d995585df320c68975ec0c9ba902da10c590f8326222f
Contents?: true
Size: 793 Bytes
Versions: 1
Compression:
Stored size: 793 Bytes
Contents
# frozen_string_literal: true # Released under the MIT License. # Copyright, 2018, by Huba Nagy. # Copyright, 2018-2023, by Samuel Williams. require_relative "pipeline" module Async module Redis module Context class Transaction < Pipeline def initialize(pool, *arguments) super(pool) end def multi call("MULTI") end def watch(*keys) sync.call("WATCH", *keys) end # Execute all queued commands, provided that no watched keys have been modified. It's important to note that even when a command fails, all the other commands in the queue are processed – Redis will not stop the processing of commands. def execute sync.call("EXEC") end def discard sync.call("DISCARD") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
async-redis-0.11.0 | lib/async/redis/context/transaction.rb |