Module: Backburner::Queue::ClassMethods
- Defined in:
- lib/backburner/queue.rb
Instance Method Summary collapse
-
#queue(name = nil) ⇒ Object
Returns or assigns queue name for this job.
-
#queue_garbage_limit(limit = nil) ⇒ Object
Returns or assigns queue jobs garbage limit (only ThreadsOnFork Worker).
-
#queue_jobs_limit(limit = nil) ⇒ Object
Returns or assigns queue parallel active jobs limit (only ThreadsOnFork and Threading workers).
-
#queue_max_job_retries(delay = nil) ⇒ Object
Returns or assigns queue max_job_retries for this job.
-
#queue_priority(pri = nil) ⇒ Object
Returns or assigns queue priority for this job.
-
#queue_respond_timeout(ttr = nil) ⇒ Object
Returns or assigns queue respond_timeout for this job.
-
#queue_retry_delay(delay = nil) ⇒ Object
Returns or assigns queue retry_delay for this job.
-
#queue_retry_delay_proc(proc = nil) ⇒ Object
Returns or assigns queue retry_delay_proc for this job.
-
#queue_retry_limit(limit = nil) ⇒ Object
Returns or assigns queue retry limit (only ThreadsOnFork worker).
Instance Method Details
#queue(name = nil) ⇒ Object
Returns or assigns queue name for this job.
24 25 26 27 28 29 30 |
# File 'lib/backburner/queue.rb', line 24 def queue(name=nil) if name @queue_name = name else # accessor (@queue_name.is_a?(Proc) ? @queue_name.call(self) : @queue_name) || Backburner.configuration.primary_queue end end |
#queue_garbage_limit(limit = nil) ⇒ Object
Returns or assigns queue jobs garbage limit (only ThreadsOnFork Worker)
122 123 124 125 126 127 128 |
# File 'lib/backburner/queue.rb', line 122 def queue_garbage_limit(limit=nil) if limit @queue_garbage_limit = limit else #accessor @queue_garbage_limit end end |
#queue_jobs_limit(limit = nil) ⇒ Object
Returns or assigns queue parallel active jobs limit (only ThreadsOnFork and Threading workers)
108 109 110 111 112 113 114 |
# File 'lib/backburner/queue.rb', line 108 def queue_jobs_limit(limit=nil) if limit @queue_jobs_limit = limit else #accessor @queue_jobs_limit end end |
#queue_max_job_retries(delay = nil) ⇒ Object
Returns or assigns queue max_job_retries for this job
66 67 68 69 70 71 72 |
# File 'lib/backburner/queue.rb', line 66 def queue_max_job_retries(delay=nil) if delay @queue_max_job_retries = delay else # accessor @queue_max_job_retries end end |
#queue_priority(pri = nil) ⇒ Object
Returns or assigns queue priority for this job
38 39 40 41 42 43 44 |
# File 'lib/backburner/queue.rb', line 38 def queue_priority(pri=nil) if pri @queue_priority = pri else # accessor @queue_priority end end |
#queue_respond_timeout(ttr = nil) ⇒ Object
Returns or assigns queue respond_timeout for this job
52 53 54 55 56 57 58 |
# File 'lib/backburner/queue.rb', line 52 def queue_respond_timeout(ttr=nil) if ttr @queue_respond_timeout = ttr else # accessor @queue_respond_timeout end end |
#queue_retry_delay(delay = nil) ⇒ Object
Returns or assigns queue retry_delay for this job
80 81 82 83 84 85 86 |
# File 'lib/backburner/queue.rb', line 80 def queue_retry_delay(delay=nil) if delay @queue_retry_delay = delay else # accessor @queue_retry_delay end end |
#queue_retry_delay_proc(proc = nil) ⇒ Object
Returns or assigns queue retry_delay_proc for this job
94 95 96 97 98 99 100 |
# File 'lib/backburner/queue.rb', line 94 def queue_retry_delay_proc(proc=nil) if proc @queue_retry_delay_proc = proc else # accessor @queue_retry_delay_proc end end |
#queue_retry_limit(limit = nil) ⇒ Object
Returns or assigns queue retry limit (only ThreadsOnFork worker)
136 137 138 139 140 141 142 |
# File 'lib/backburner/queue.rb', line 136 def queue_retry_limit(limit=nil) if limit @queue_retry_limit = limit else #accessor @queue_retry_limit end end |