Class: Sbmt::Outbox::V2::Tasks::Process

Inherits:
Base
  • Object
show all
Defined in:
lib/sbmt/outbox/v2/tasks/process.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#item_class, #log_tags, #worker_name, #worker_version, #yabeda_labels

Instance Method Summary collapse

Methods inherited from Base

#to_h

Constructor Details

#initialize(item_class:, worker_name:, bucket:, ids:) ⇒ Process

Returns a new instance of Process.



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/sbmt/outbox/v2/tasks/process.rb', line 12

def initialize(item_class:, worker_name:, bucket:, ids:)
  super(item_class: item_class, worker_name: worker_name)

  @bucket = bucket
  @ids = ids

  @resource_key = "#{item_class.box_name}:#{bucket}"
  @resource_path = "sbmt:outbox:#{worker_name}:#{resource_key}"

  @log_tags = log_tags.merge(bucket: bucket)
end

Instance Attribute Details

#bucketObject (readonly)

Returns the value of attribute bucket.



10
11
12
# File 'lib/sbmt/outbox/v2/tasks/process.rb', line 10

def bucket
  @bucket
end

#idsObject (readonly)

Returns the value of attribute ids.



10
11
12
# File 'lib/sbmt/outbox/v2/tasks/process.rb', line 10

def ids
  @ids
end

#partitionObject (readonly)

Returns the value of attribute partition.



10
11
12
# File 'lib/sbmt/outbox/v2/tasks/process.rb', line 10

def partition
  @partition
end

#resource_keyObject (readonly)

Returns the value of attribute resource_key.



10
11
12
# File 'lib/sbmt/outbox/v2/tasks/process.rb', line 10

def resource_key
  @resource_key
end

#resource_pathObject (readonly)

Returns the value of attribute resource_path.



10
11
12
# File 'lib/sbmt/outbox/v2/tasks/process.rb', line 10

def resource_path
  @resource_path
end

Instance Method Details

#to_sObject



24
25
26
# File 'lib/sbmt/outbox/v2/tasks/process.rb', line 24

def to_s
  resource_path
end