lib/maglev/active_job/reliable.rb
# adds the job to the reliable collection. Provided as its own method so that a job
# could optionally decide to use reliable functionality within its own perform method.
# A block should be provided so that ack! will be sure to be called
adds the job to the reliable collection. Provided as its own method so that a job
could optionally decide to use reliable functionality within its own perform method.
A block should be provided so that ack. will be sure to be called
adds the job to the reliable collection . Provided as its own method so that a job could optionally decide to use reliable functionality within its own perform method . A block should be provided so that ack . will be sure to be called
def rely!(&block)
        begin
          MagLev.redis do |conn|
            conn.hset(Reliable.key, rely_key, Time.now)
          end
          @rely = true
        rescue => ex
          MagLev.logger.report(:error, "Failed to set reliable key", ex)
        end
        if block
          begin
            block.call
          ensure
            ack!
          end
        end
      end
def rely! ( & block ) begin MagLev . redis do | conn | conn . hset ( Reliable . key , rely_key , Time . now ) end @rely = true rescue => ex MagLev . logger . report ( :error , "Failed to set reliable key" , ex ) end if block begin block . call ensure ack! end end end
adds the job to the reliable collection.
adds the job to the reliable collection .
block
<not_specific>