class Sneakers::Handlers::Oneshot

Public Class Methods

new(channel, queue, opts) click to toggle source
# File lib/sneakers/handlers/oneshot.rb, line 4
def initialize(channel, queue, opts)
  @channel = channel
  @opts = opts
end

Public Instance Methods

acknowledge(hdr, props, msg) click to toggle source
# File lib/sneakers/handlers/oneshot.rb, line 9
def acknowledge(hdr, props, msg)
  @channel.acknowledge(hdr.delivery_tag, false)
end
error(hdr, props, msg, err) click to toggle source
# File lib/sneakers/handlers/oneshot.rb, line 17
def error(hdr, props, msg, err)
  reject(hdr, props, msg)
end
noop(hdr, props, msg) click to toggle source
# File lib/sneakers/handlers/oneshot.rb, line 21
def noop(hdr, props, msg)

end
reject(hdr, props, msg, requeue=false) click to toggle source
# File lib/sneakers/handlers/oneshot.rb, line 13
def reject(hdr, props, msg, requeue=false)
  @channel.reject(hdr.delivery_tag, requeue)
end