Class: Zizq::WorkerConfiguration
- Inherits:
-
Struct
- Object
- Struct
- Zizq::WorkerConfiguration
- Defined in:
- lib/zizq/worker_configuration.rb
Overview
Defaults for ‘Zizq::Worker` instances. Accessed via `Zizq.configuration.worker` and typically populated inside an application’s ‘Zizq.configure` block:
Zizq.configure do |c|
c.url = "https://..."
c.worker.queues = ["emails", "webhooks"]
c.worker.thread_count = 1
c.worker.fiber_count = 25
end
Every field defaults to ‘nil`, meaning “use the Worker’s own hardcoded default.” Anything explicitly passed to ‘Worker.new` —or set via CLI flag / env var when launching `zizq-worker` —overrides whatever is set here.
See ‘Zizq::Worker#initialize` for the full resolution order (explicit kwarg → Zizq.configuration.worker → `Worker::DEFAULT_*`).
Fields:
-
‘queues` — Queues to consume. `[]` means all queues.
-
‘thread_count` — Number of worker threads.
-
‘fiber_count` — Number of fibers per worker thread.
-
‘prefetch` — Server-side prefetch limit. Defaults to `2 * threads * fibers`.
-
‘retry_min_wait` — Minimum reconnect backoff in seconds.
-
‘retry_max_wait` — Maximum reconnect backoff in seconds.
-
‘retry_multiplier` — Multiplicative backoff factor between reconnect attempts.
Instance Attribute Summary collapse
-
#fiber_count ⇒ Object
Returns the value of attribute fiber_count.
-
#prefetch ⇒ Object
Returns the value of attribute prefetch.
-
#queues ⇒ Object
Returns the value of attribute queues.
-
#retry_max_wait ⇒ Object
Returns the value of attribute retry_max_wait.
-
#retry_min_wait ⇒ Object
Returns the value of attribute retry_min_wait.
-
#retry_multiplier ⇒ Object
Returns the value of attribute retry_multiplier.
-
#thread_count ⇒ Object
Returns the value of attribute thread_count.
Instance Attribute Details
#fiber_count ⇒ Object
Returns the value of attribute fiber_count
38 39 40 |
# File 'lib/zizq/worker_configuration.rb', line 38 def fiber_count @fiber_count end |
#prefetch ⇒ Object
Returns the value of attribute prefetch
38 39 40 |
# File 'lib/zizq/worker_configuration.rb', line 38 def prefetch @prefetch end |
#queues ⇒ Object
Returns the value of attribute queues
38 39 40 |
# File 'lib/zizq/worker_configuration.rb', line 38 def queues @queues end |
#retry_max_wait ⇒ Object
Returns the value of attribute retry_max_wait
38 39 40 |
# File 'lib/zizq/worker_configuration.rb', line 38 def retry_max_wait @retry_max_wait end |
#retry_min_wait ⇒ Object
Returns the value of attribute retry_min_wait
38 39 40 |
# File 'lib/zizq/worker_configuration.rb', line 38 def retry_min_wait @retry_min_wait end |
#retry_multiplier ⇒ Object
Returns the value of attribute retry_multiplier
38 39 40 |
# File 'lib/zizq/worker_configuration.rb', line 38 def retry_multiplier @retry_multiplier end |
#thread_count ⇒ Object
Returns the value of attribute thread_count
38 39 40 |
# File 'lib/zizq/worker_configuration.rb', line 38 def thread_count @thread_count end |