Sha256: d0adbce02c7bd74c514e00d6ab11d3227857a31918ad02c0ae8d4a2a66150977
Contents?: true
Size: 847 Bytes
Versions: 2
Compression:
Stored size: 847 Bytes
Contents
module MultiWorker module Interface # Configures queueing for a class or module. # Options: # :queue => name of the queue to use (defaults to :default) # :mailer => Queue mail messages (only for ActionMailer) (defaults to false) # :lockable => Use locking on the job (defaults to true) # :lock_timeout => Optional lock timeout # :loner => Make this job unique in the queue (defaults to false) # :status => Turn on status tracking (defaults to false) # # Example: # # class WorkerClass # worker :queue => :processing, :loner => true def worker(opts={}) opts = MultiWorker.default_options.merge(opts) adapter_klass = MultiWorker.adapter(opts[:adapter]) adapter_klass.configure(self, opts) end end end Class.send :include, MultiWorker::Interface
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
multi_worker-0.2.0 | lib/multi_worker/interface.rb |
multi_worker-0.1.0 | lib/multi_worker/interface.rb |