Module: Funktor::Worker::FunktorOptions::ClassMethods
- Defined in:
- lib/funktor/worker/funktor_options.rb
Instance Method Summary collapse
- #custom_queue ⇒ Object
- #custom_queue_url ⇒ Object
- #custom_retry_limit ⇒ Object
- #funktor_options(options = {}) ⇒ Object
- #funktor_retry_in(&block) ⇒ Object
- #get_funktor_options ⇒ Object
- #queue_url ⇒ Object
- #work_queue ⇒ Object
Instance Method Details
#custom_queue ⇒ Object
30 31 32 |
# File 'lib/funktor/worker/funktor_options.rb', line 30 def custom_queue [:queue] end |
#custom_queue_url ⇒ Object
26 27 28 |
# File 'lib/funktor/worker/funktor_options.rb', line 26 def custom_queue_url [:queue_url] end |
#custom_retry_limit ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/funktor/worker/funktor_options.rb', line 34 def custom_retry_limit retry_limit = [:retry] if retry_limit.nil? retry_limit = 25 elsif !retry_limit # if someone did "retry: false" retry_limit = 0 end return retry_limit end |
#funktor_options(options = {}) ⇒ Object
14 15 16 |
# File 'lib/funktor/worker/funktor_options.rb', line 14 def ( = {}) self. = end |
#funktor_retry_in(&block) ⇒ Object
22 23 24 |
# File 'lib/funktor/worker/funktor_options.rb', line 22 def funktor_retry_in(&block) self.funktor_retry_in_block = block end |
#get_funktor_options ⇒ Object
18 19 20 |
# File 'lib/funktor/worker/funktor_options.rb', line 18 def self. || {} end |
#queue_url ⇒ Object
44 45 46 |
# File 'lib/funktor/worker/funktor_options.rb', line 44 def queue_url custom_queue_url end |
#work_queue ⇒ Object
48 49 50 |
# File 'lib/funktor/worker/funktor_options.rb', line 48 def work_queue (self.custom_queue || 'default').to_s end |