Sha256: 23c879d8e96ba2ad74461e0afa51e5e8b488966b4e3281c0d0462b69d3b8c239
Contents?: true
Size: 337 Bytes
Versions: 13
Compression:
Stored size: 337 Bytes
Contents
module Sad module Worker def queue_name name = if self.respond_to?(:queue) self.send :queue else nil end Sad::Config.queue(name) end def enqueue(*args) payload = ::Sad::Payload.new(self.to_s, args) payload.sad_args['queue'] = queue_name yield payload if block_given? payload.enqueue end end end
Version data entries
13 entries across 13 versions & 1 rubygems