Class: OpenC3::StoreConnectionPool
- Defined in:
- lib/openc3/utilities/store_autoload.rb
Instance Method Summary collapse
Instance Method Details
#pipelined ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/openc3/utilities/store_autoload.rb', line 25 def pipelined with do |redis| redis.pipelined do |pipeline| Thread.current[:pipeline] = pipeline begin yield ensure Thread.current[:pipeline] = nil end end end end |
#with(**options, &block) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/openc3/utilities/store_autoload.rb', line 38 def with(**, &block) pipeline = Thread.current[:pipeline] if pipeline yield pipeline else super(**, &block) end end |