Method: RQ::JobQueue#ro_transaction

Defined in:
lib/rq/jobqueue.rb

#ro_transaction(*args) ⇒ Object

–}}}



805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
# File 'lib/rq/jobqueue.rb', line 805

def ro_transaction(*args)
#--{{{
  ret = nil
  if @in_ro_transaction || @in_transaction
    ret = yield
  else
    begin
      @in_ro_transaction = true
      @qdb.ro_transaction(*args){ ret = yield }
    ensure
      @in_ro_transaction = false 
    end
  end
  ret
#--}}}
end