Class: Temporalio::Client::ActivityExecution
- Inherits:
-
Object
- Object
- Temporalio::Client::ActivityExecution
- Defined in:
- lib/temporalio/client/activity_execution.rb
Overview
Info for a standalone activity execution. Returned by list_activities; extended by Description for describe results.
Defined Under Namespace
Classes: Description
Instance Attribute Summary collapse
-
#raw_info ⇒ Api::Activity::V1::ActivityExecutionListInfo, Api::Activity::V1::ActivityExecutionInfo
readonly
Underlying protobuf info.
Instance Method Summary collapse
-
#activity_id ⇒ String
ID for the activity.
-
#activity_run_id ⇒ String
Run ID for this activity execution attempt.
-
#activity_type ⇒ String
Type name of the activity.
-
#close_time ⇒ Time?
When the activity reached a terminal state.
-
#execution_duration ⇒ Float?
How long this activity has been running across all attempts, in seconds.
-
#schedule_time ⇒ Time?
When the activity was scheduled.
-
#search_attributes ⇒ SearchAttributes?
Search attributes attached to this activity if any.
-
#status ⇒ ActivityExecutionStatus
Overall status for the activity.
-
#task_queue ⇒ String
Task queue for the activity.
Instance Attribute Details
#raw_info ⇒ Api::Activity::V1::ActivityExecutionListInfo, Api::Activity::V1::ActivityExecutionInfo (readonly)
Returns Underlying protobuf info.
19 20 21 |
# File 'lib/temporalio/client/activity_execution.rb', line 19 def raw_info @raw_info end |
Instance Method Details
#activity_id ⇒ String
Returns ID for the activity.
28 29 30 |
# File 'lib/temporalio/client/activity_execution.rb', line 28 def activity_id @raw_info.activity_id end |
#activity_run_id ⇒ String
Returns Run ID for this activity execution attempt.
33 34 35 |
# File 'lib/temporalio/client/activity_execution.rb', line 33 def activity_run_id Internal::ProtoUtils.string_or(@raw_info.run_id, nil) end |
#activity_type ⇒ String
Returns Type name of the activity.
38 39 40 |
# File 'lib/temporalio/client/activity_execution.rb', line 38 def activity_type @raw_info.activity_type&.name end |
#close_time ⇒ Time?
Returns When the activity reached a terminal state.
48 49 50 |
# File 'lib/temporalio/client/activity_execution.rb', line 48 def close_time Internal::ProtoUtils.(@raw_info.close_time) end |
#execution_duration ⇒ Float?
Returns How long this activity has been running across all attempts, in seconds.
68 69 70 |
# File 'lib/temporalio/client/activity_execution.rb', line 68 def execution_duration Internal::ProtoUtils.duration_to_seconds(@raw_info.execution_duration) end |
#schedule_time ⇒ Time?
Returns When the activity was scheduled.
43 44 45 |
# File 'lib/temporalio/client/activity_execution.rb', line 43 def schedule_time Internal::ProtoUtils.(@raw_info.schedule_time) end |
#search_attributes ⇒ SearchAttributes?
Returns Search attributes attached to this activity if any.
58 59 60 |
# File 'lib/temporalio/client/activity_execution.rb', line 58 def search_attributes @search_attributes.get end |
#status ⇒ ActivityExecutionStatus
Returns Overall status for the activity.
53 54 55 |
# File 'lib/temporalio/client/activity_execution.rb', line 53 def status Internal::ProtoUtils.enum_to_int(Api::Enums::V1::ActivityExecutionStatus, @raw_info.status) end |
#task_queue ⇒ String
Returns Task queue for the activity.
63 64 65 |
# File 'lib/temporalio/client/activity_execution.rb', line 63 def task_queue @raw_info.task_queue end |