Module: ReadFromSlave::CalculationMethod

Defined in:
lib/read_from_slave.rb

Instance Method Summary collapse

Instance Method Details

#calculate_with_read_from_slave(*args) ⇒ Object


242
243
244
245
246
247
# File 'lib/read_from_slave.rb', line 242

def calculate_with_read_from_slave(*args)
  Thread.current[:read_from_slave] = true
  calculate_without_read_from_slave(*args)
ensure
  Thread.current[:read_from_slave] = false
end