Class: Sbmt::Outbox::V2::Tasks::Poll
- Defined in:
- lib/sbmt/outbox/v2/tasks/poll.rb
Instance Attribute Summary collapse
-
#buckets ⇒ Object
readonly
Returns the value of attribute buckets.
-
#partition ⇒ Object
readonly
Returns the value of attribute partition.
-
#redis_queue ⇒ Object
readonly
Returns the value of attribute redis_queue.
-
#resource_key ⇒ Object
readonly
Returns the value of attribute resource_key.
-
#resource_path ⇒ Object
readonly
Returns the value of attribute resource_path.
Attributes inherited from Base
#item_class, #log_tags, #worker_name, #worker_version, #yabeda_labels
Instance Method Summary collapse
-
#initialize(item_class:, worker_name:, partition:, buckets:) ⇒ Poll
constructor
A new instance of Poll.
- #to_s ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(item_class:, worker_name:, partition:, buckets:) ⇒ Poll
Returns a new instance of Poll.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/sbmt/outbox/v2/tasks/poll.rb', line 12 def initialize(item_class:, worker_name:, partition:, buckets:) super(item_class: item_class, worker_name: worker_name) @partition = partition @buckets = buckets @resource_key = "#{item_class.box_name}:#{partition}" @resource_path = "sbmt:outbox:#{worker_name}:#{resource_key}" @redis_queue = "#{item_class.box_name}:job_queue" @log_tags = .merge(box_partition: partition) @yabeda_labels = yabeda_labels.merge(partition: partition) end |
Instance Attribute Details
#buckets ⇒ Object (readonly)
Returns the value of attribute buckets.
10 11 12 |
# File 'lib/sbmt/outbox/v2/tasks/poll.rb', line 10 def buckets @buckets end |
#partition ⇒ Object (readonly)
Returns the value of attribute partition.
10 11 12 |
# File 'lib/sbmt/outbox/v2/tasks/poll.rb', line 10 def partition @partition end |
#redis_queue ⇒ Object (readonly)
Returns the value of attribute redis_queue.
10 11 12 |
# File 'lib/sbmt/outbox/v2/tasks/poll.rb', line 10 def redis_queue @redis_queue end |
#resource_key ⇒ Object (readonly)
Returns the value of attribute resource_key.
10 11 12 |
# File 'lib/sbmt/outbox/v2/tasks/poll.rb', line 10 def resource_key @resource_key end |
#resource_path ⇒ Object (readonly)
Returns the value of attribute resource_path.
10 11 12 |
# File 'lib/sbmt/outbox/v2/tasks/poll.rb', line 10 def resource_path @resource_path end |
Instance Method Details
#to_s ⇒ Object
27 28 29 |
# File 'lib/sbmt/outbox/v2/tasks/poll.rb', line 27 def to_s resource_path end |