Sha256: 1e7900de5d1e9267b1895f2a6f9eb63178fd2c9982392666f2754e8debeb5d32
Contents?: true
Size: 543 Bytes
Versions: 5
Compression:
Stored size: 543 Bytes
Contents
module Qe module Worker module ClassMethods # Enqueue job on given worker class. def enqueue(options = {}) run_at = options.delete(:run_at) if run_at Qe.adapter.schedule(self, run_at, options) else Qe.adapter.enqueue(self, options) end end # Set the queue name when receiving one argument. # Return queue name otherwise. def queue(*args) @queue = args.first unless args.empty? (@queue || :default).to_s end end end end
Version data entries
5 entries across 5 versions & 1 rubygems