Module: Async::Background::Job::ClassMethods
- Defined in:
- lib/async/background/job.rb
Instance Method Summary collapse
- #options(**values) ⇒ Object
- #perform_async(*args, options: {}) ⇒ Object
- #perform_at(time, *args, options: {}) ⇒ Object
- #perform_in(delay, *args, options: {}) ⇒ Object
- #perform_now(*args) ⇒ Object
- #resolve_options ⇒ Object
Instance Method Details
#options(**values) ⇒ Object
62 63 64 |
# File 'lib/async/background/job.rb', line 62 def (**values) @options = Options.new(**values).to_h.compact end |
#perform_async(*args, options: {}) ⇒ Object
58 |
# File 'lib/async/background/job.rb', line 58 def perform_async(*args, options: {}) = Async::Background::Queue.enqueue(self, *args, options: ) |
#perform_at(time, *args, options: {}) ⇒ Object
60 |
# File 'lib/async/background/job.rb', line 60 def perform_at(time, *args, options: {}) = Async::Background::Queue.enqueue_at(time, self, *args, options: ) |
#perform_in(delay, *args, options: {}) ⇒ Object
59 |
# File 'lib/async/background/job.rb', line 59 def perform_in(delay, *args, options: {}) = Async::Background::Queue.enqueue_in(delay, self, *args, options: ) |
#perform_now(*args) ⇒ Object
56 |
# File 'lib/async/background/job.rb', line 56 def perform_now(*args) = new.perform(*args) |
#resolve_options ⇒ Object
66 |
# File 'lib/async/background/job.rb', line 66 def = @options || {} |