Class: Temporal::Metadata::Activity
- Defined in:
- lib/temporal/metadata/activity.rb
Instance Attribute Summary collapse
-
#attempt ⇒ Object
readonly
Returns the value of attribute attempt.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#heartbeat_details ⇒ Object
readonly
Returns the value of attribute heartbeat_details.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#task_token ⇒ Object
readonly
Returns the value of attribute task_token.
-
#workflow_id ⇒ Object
readonly
Returns the value of attribute workflow_id.
-
#workflow_name ⇒ Object
readonly
Returns the value of attribute workflow_name.
-
#workflow_run_id ⇒ Object
readonly
Returns the value of attribute workflow_run_id.
Instance Method Summary collapse
- #activity? ⇒ Boolean
-
#initialize(namespace:, id:, name:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:, headers: {}, heartbeat_details:) ⇒ Activity
constructor
A new instance of Activity.
- #to_h ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(namespace:, id:, name:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:, headers: {}, heartbeat_details:) ⇒ Activity
Returns a new instance of Activity.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/temporal/metadata/activity.rb', line 8 def initialize(namespace:, id:, name:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:, headers: {}, heartbeat_details:) @namespace = namespace @id = id @name = name @task_token = task_token @attempt = attempt @workflow_run_id = workflow_run_id @workflow_id = workflow_id @workflow_name = workflow_name @headers = headers @heartbeat_details = heartbeat_details freeze end |
Instance Attribute Details
#attempt ⇒ Object (readonly)
Returns the value of attribute attempt.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def attempt @attempt end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def headers @headers end |
#heartbeat_details ⇒ Object (readonly)
Returns the value of attribute heartbeat_details.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def heartbeat_details @heartbeat_details end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def name @name end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def namespace @namespace end |
#task_token ⇒ Object (readonly)
Returns the value of attribute task_token.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def task_token @task_token end |
#workflow_id ⇒ Object (readonly)
Returns the value of attribute workflow_id.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def workflow_id @workflow_id end |
#workflow_name ⇒ Object (readonly)
Returns the value of attribute workflow_name.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def workflow_name @workflow_name end |
#workflow_run_id ⇒ Object (readonly)
Returns the value of attribute workflow_run_id.
6 7 8 |
# File 'lib/temporal/metadata/activity.rb', line 6 def workflow_run_id @workflow_run_id end |
Instance Method Details
#activity? ⇒ Boolean
23 24 25 |
# File 'lib/temporal/metadata/activity.rb', line 23 def activity? true end |
#to_h ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/temporal/metadata/activity.rb', line 27 def to_h { 'namespace' => namespace, 'workflow_id' => workflow_id, 'workflow_name' => workflow_name, 'workflow_run_id' => workflow_run_id, 'activity_id' => id, 'activity_name' => name, 'attempt' => attempt } end |