Module: Jiggler::Job::ClassMethods
- Defined in:
- lib/jiggler/job.rb
Instance Method Summary collapse
- #enqueue(*args) ⇒ Object
- #enqueue_bulk(args_arr) ⇒ Object
- #enqueue_in(seconds, *args) ⇒ Object
- #job_options(queue: nil, retries: nil, retry_queue: nil) ⇒ Object
- #queue ⇒ Object
- #retries ⇒ Object
- #retry_queue ⇒ Object
-
#with_options(options) ⇒ Object
MyJob.with_options(queue: ‘custom’, retries: 3).enqueue(*args).
Instance Method Details
#enqueue(*args) ⇒ Object
6 7 8 |
# File 'lib/jiggler/job.rb', line 6 def enqueue(*args) Enqueuer.new(self).enqueue(*args) end |
#enqueue_bulk(args_arr) ⇒ Object
19 20 21 |
# File 'lib/jiggler/job.rb', line 19 def enqueue_bulk(args_arr) Enqueuer.new(self).enqueue_bulk(args_arr) end |
#enqueue_in(seconds, *args) ⇒ Object
10 11 12 |
# File 'lib/jiggler/job.rb', line 10 def enqueue_in(seconds, *args) Enqueuer.new(self).enqueue_in(seconds, *args) end |
#job_options(queue: nil, retries: nil, retry_queue: nil) ⇒ Object
35 36 37 38 39 |
# File 'lib/jiggler/job.rb', line 35 def (queue: nil, retries: nil, retry_queue: nil) @queue = queue || Jiggler::Config::DEFAULT_QUEUE @retries = retries || 0 @retry_queue = retry_queue || queue end |
#queue ⇒ Object
23 24 25 |
# File 'lib/jiggler/job.rb', line 23 def queue @queue || Jiggler::Config::DEFAULT_QUEUE end |
#retries ⇒ Object
31 32 33 |
# File 'lib/jiggler/job.rb', line 31 def retries @retries || 0 end |
#retry_queue ⇒ Object
27 28 29 |
# File 'lib/jiggler/job.rb', line 27 def retry_queue @retry_queue || Jiggler::Config::DEFAULT_QUEUE end |