Class: Conductor::Http::Models::Task
- Defined in:
- lib/conductor/http/models/task.rb
Overview
Task model representing a task in a workflow
Constant Summary collapse
- SWAGGER_TYPES =
{ task_type: 'String', status: 'String', input_data: 'Hash<String, Object>', reference_task_name: 'String', retry_count: 'Integer', seq: 'Integer', correlation_id: 'String', poll_count: 'Integer', task_def_name: 'String', scheduled_time: 'Integer', start_time: 'Integer', end_time: 'Integer', update_time: 'Integer', start_delay_in_seconds: 'Integer', retried_task_id: 'String', retried: 'Boolean', executed: 'Boolean', callback_from_worker: 'Boolean', response_timeout_seconds: 'Integer', workflow_instance_id: 'String', workflow_type: 'String', task_id: 'String', reason_for_incompletion: 'String', callback_after_seconds: 'Integer', worker_id: 'String', output_data: 'Hash<String, Object>', workflow_task: 'WorkflowTask', domain: 'String', rate_limit_per_frequency: 'Integer', rate_limit_frequency_in_seconds: 'Integer', external_input_payload_storage_path: 'String', external_output_payload_storage_path: 'String', workflow_priority: 'Integer', execution_name_space: 'String', isolation_group_id: 'String', iteration: 'Integer', sub_workflow_id: 'String', subworkflow_changed: 'Boolean', parent_task_id: 'String', first_start_time: 'Integer', loop_over_task: 'Boolean', task_definition: 'TaskDef', queue_wait_time: 'Integer' }.freeze
- ATTRIBUTE_MAP =
{ task_type: :taskType, status: :status, input_data: :inputData, reference_task_name: :referenceTaskName, retry_count: :retryCount, seq: :seq, correlation_id: :correlationId, poll_count: :pollCount, task_def_name: :taskDefName, scheduled_time: :scheduledTime, start_time: :startTime, end_time: :endTime, update_time: :updateTime, start_delay_in_seconds: :startDelayInSeconds, retried_task_id: :retriedTaskId, retried: :retried, executed: :executed, callback_from_worker: :callbackFromWorker, response_timeout_seconds: :responseTimeoutSeconds, workflow_instance_id: :workflowInstanceId, workflow_type: :workflowType, task_id: :taskId, reason_for_incompletion: :reasonForIncompletion, callback_after_seconds: :callbackAfterSeconds, worker_id: :workerId, output_data: :outputData, workflow_task: :workflowTask, domain: :domain, rate_limit_per_frequency: :rateLimitPerFrequency, rate_limit_frequency_in_seconds: :rateLimitFrequencyInSeconds, external_input_payload_storage_path: :externalInputPayloadStoragePath, external_output_payload_storage_path: :externalOutputPayloadStoragePath, workflow_priority: :workflowPriority, execution_name_space: :executionNameSpace, isolation_group_id: :isolationGroupId, iteration: :iteration, sub_workflow_id: :subWorkflowId, subworkflow_changed: :subworkflowChanged, parent_task_id: :parentTaskId, first_start_time: :firstStartTime, loop_over_task: :loopOverTask, task_definition: :taskDefinition, queue_wait_time: :queueWaitTime }.freeze
Instance Attribute Summary collapse
-
#callback_after_seconds ⇒ Object
Returns the value of attribute callback_after_seconds.
-
#callback_from_worker ⇒ Object
Returns the value of attribute callback_from_worker.
-
#correlation_id ⇒ Object
Returns the value of attribute correlation_id.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#executed ⇒ Object
Returns the value of attribute executed.
-
#execution_name_space ⇒ Object
Returns the value of attribute execution_name_space.
-
#external_input_payload_storage_path ⇒ Object
Returns the value of attribute external_input_payload_storage_path.
-
#external_output_payload_storage_path ⇒ Object
Returns the value of attribute external_output_payload_storage_path.
-
#first_start_time ⇒ Object
Returns the value of attribute first_start_time.
-
#input_data ⇒ Object
Returns the value of attribute input_data.
-
#isolation_group_id ⇒ Object
Returns the value of attribute isolation_group_id.
-
#iteration ⇒ Object
Returns the value of attribute iteration.
-
#loop_over_task ⇒ Object
Returns the value of attribute loop_over_task.
-
#output_data ⇒ Object
Returns the value of attribute output_data.
-
#parent_task_id ⇒ Object
Returns the value of attribute parent_task_id.
-
#poll_count ⇒ Object
Returns the value of attribute poll_count.
-
#queue_wait_time ⇒ Object
Returns the value of attribute queue_wait_time.
-
#rate_limit_frequency_in_seconds ⇒ Object
Returns the value of attribute rate_limit_frequency_in_seconds.
-
#rate_limit_per_frequency ⇒ Object
Returns the value of attribute rate_limit_per_frequency.
-
#reason_for_incompletion ⇒ Object
Returns the value of attribute reason_for_incompletion.
-
#reference_task_name ⇒ Object
Returns the value of attribute reference_task_name.
-
#response_timeout_seconds ⇒ Object
Returns the value of attribute response_timeout_seconds.
-
#retried ⇒ Object
Returns the value of attribute retried.
-
#retried_task_id ⇒ Object
Returns the value of attribute retried_task_id.
-
#retry_count ⇒ Object
Returns the value of attribute retry_count.
-
#scheduled_time ⇒ Object
Returns the value of attribute scheduled_time.
-
#seq ⇒ Object
Returns the value of attribute seq.
-
#start_delay_in_seconds ⇒ Object
Returns the value of attribute start_delay_in_seconds.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#status ⇒ Object
Returns the value of attribute status.
-
#sub_workflow_id ⇒ Object
Returns the value of attribute sub_workflow_id.
-
#subworkflow_changed ⇒ Object
Returns the value of attribute subworkflow_changed.
-
#task_def_name ⇒ Object
Returns the value of attribute task_def_name.
-
#task_definition ⇒ Object
Returns the value of attribute task_definition.
-
#task_id ⇒ Object
Returns the value of attribute task_id.
-
#task_type ⇒ Object
Returns the value of attribute task_type.
-
#update_time ⇒ Object
Returns the value of attribute update_time.
-
#worker_id ⇒ Object
Returns the value of attribute worker_id.
-
#workflow_instance_id ⇒ Object
Returns the value of attribute workflow_instance_id.
-
#workflow_priority ⇒ Object
Returns the value of attribute workflow_priority.
-
#workflow_task ⇒ Object
Returns the value of attribute workflow_task.
-
#workflow_type ⇒ Object
Returns the value of attribute workflow_type.
Instance Method Summary collapse
-
#completed? ⇒ Boolean
Check if task completed successfully.
-
#failed? ⇒ Boolean
Check if task failed.
-
#in_progress? ⇒ Boolean
Check if task is in progress.
-
#initialize(attributes = {}) ⇒ Task
constructor
Initialize a new Task.
-
#terminal? ⇒ Boolean
Check if task is in terminal state.
Methods inherited from BaseModel
attribute_map, deserialize_model, deserialize_value, find_model_class, from_hash, from_json, parse_datetime, swagger_types, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ Task
Initialize a new Task
117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/conductor/http/models/task.rb', line 117 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # Set all attributes from the hash SWAGGER_TYPES.each_key do |key| send("#{key}=", attributes[key]) if attributes.key?(key) end # Set default values for collections @input_data ||= {} @output_data ||= {} end |
Instance Attribute Details
#callback_after_seconds ⇒ Object
Returns the value of attribute callback_after_seconds.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def callback_after_seconds @callback_after_seconds end |
#callback_from_worker ⇒ Object
Returns the value of attribute callback_from_worker.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def callback_from_worker @callback_from_worker end |
#correlation_id ⇒ Object
Returns the value of attribute correlation_id.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def correlation_id @correlation_id end |
#domain ⇒ Object
Returns the value of attribute domain.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def domain @domain end |
#end_time ⇒ Object
Returns the value of attribute end_time.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def end_time @end_time end |
#executed ⇒ Object
Returns the value of attribute executed.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def executed @executed end |
#execution_name_space ⇒ Object
Returns the value of attribute execution_name_space.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def execution_name_space @execution_name_space end |
#external_input_payload_storage_path ⇒ Object
Returns the value of attribute external_input_payload_storage_path.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def external_input_payload_storage_path @external_input_payload_storage_path end |
#external_output_payload_storage_path ⇒ Object
Returns the value of attribute external_output_payload_storage_path.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def external_output_payload_storage_path @external_output_payload_storage_path end |
#first_start_time ⇒ Object
Returns the value of attribute first_start_time.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def first_start_time @first_start_time end |
#input_data ⇒ Object
Returns the value of attribute input_data.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def input_data @input_data end |
#isolation_group_id ⇒ Object
Returns the value of attribute isolation_group_id.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def isolation_group_id @isolation_group_id end |
#iteration ⇒ Object
Returns the value of attribute iteration.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def iteration @iteration end |
#loop_over_task ⇒ Object
Returns the value of attribute loop_over_task.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def loop_over_task @loop_over_task end |
#output_data ⇒ Object
Returns the value of attribute output_data.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def output_data @output_data end |
#parent_task_id ⇒ Object
Returns the value of attribute parent_task_id.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def parent_task_id @parent_task_id end |
#poll_count ⇒ Object
Returns the value of attribute poll_count.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def poll_count @poll_count end |
#queue_wait_time ⇒ Object
Returns the value of attribute queue_wait_time.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def queue_wait_time @queue_wait_time end |
#rate_limit_frequency_in_seconds ⇒ Object
Returns the value of attribute rate_limit_frequency_in_seconds.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def rate_limit_frequency_in_seconds @rate_limit_frequency_in_seconds end |
#rate_limit_per_frequency ⇒ Object
Returns the value of attribute rate_limit_per_frequency.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def rate_limit_per_frequency @rate_limit_per_frequency end |
#reason_for_incompletion ⇒ Object
Returns the value of attribute reason_for_incompletion.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def reason_for_incompletion @reason_for_incompletion end |
#reference_task_name ⇒ Object
Returns the value of attribute reference_task_name.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def reference_task_name @reference_task_name end |
#response_timeout_seconds ⇒ Object
Returns the value of attribute response_timeout_seconds.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def response_timeout_seconds @response_timeout_seconds end |
#retried ⇒ Object
Returns the value of attribute retried.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def retried @retried end |
#retried_task_id ⇒ Object
Returns the value of attribute retried_task_id.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def retried_task_id @retried_task_id end |
#retry_count ⇒ Object
Returns the value of attribute retry_count.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def retry_count @retry_count end |
#scheduled_time ⇒ Object
Returns the value of attribute scheduled_time.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def scheduled_time @scheduled_time end |
#seq ⇒ Object
Returns the value of attribute seq.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def seq @seq end |
#start_delay_in_seconds ⇒ Object
Returns the value of attribute start_delay_in_seconds.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def start_delay_in_seconds @start_delay_in_seconds end |
#start_time ⇒ Object
Returns the value of attribute start_time.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def start_time @start_time end |
#status ⇒ Object
Returns the value of attribute status.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def status @status end |
#sub_workflow_id ⇒ Object
Returns the value of attribute sub_workflow_id.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def sub_workflow_id @sub_workflow_id end |
#subworkflow_changed ⇒ Object
Returns the value of attribute subworkflow_changed.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def subworkflow_changed @subworkflow_changed end |
#task_def_name ⇒ Object
Returns the value of attribute task_def_name.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def task_def_name @task_def_name end |
#task_definition ⇒ Object
Returns the value of attribute task_definition.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def task_definition @task_definition end |
#task_id ⇒ Object
Returns the value of attribute task_id.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def task_id @task_id end |
#task_type ⇒ Object
Returns the value of attribute task_type.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def task_type @task_type end |
#update_time ⇒ Object
Returns the value of attribute update_time.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def update_time @update_time end |
#worker_id ⇒ Object
Returns the value of attribute worker_id.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def worker_id @worker_id end |
#workflow_instance_id ⇒ Object
Returns the value of attribute workflow_instance_id.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def workflow_instance_id @workflow_instance_id end |
#workflow_priority ⇒ Object
Returns the value of attribute workflow_priority.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def workflow_priority @workflow_priority end |
#workflow_task ⇒ Object
Returns the value of attribute workflow_task.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def workflow_task @workflow_task end |
#workflow_type ⇒ Object
Returns the value of attribute workflow_type.
102 103 104 |
# File 'lib/conductor/http/models/task.rb', line 102 def workflow_type @workflow_type end |
Instance Method Details
#completed? ⇒ Boolean
Check if task completed successfully
138 139 140 |
# File 'lib/conductor/http/models/task.rb', line 138 def completed? status == 'COMPLETED' end |
#failed? ⇒ Boolean
Check if task failed
144 145 146 |
# File 'lib/conductor/http/models/task.rb', line 144 def failed? %w[FAILED FAILED_WITH_TERMINAL_ERROR].include?(status) end |
#in_progress? ⇒ Boolean
Check if task is in progress
150 151 152 |
# File 'lib/conductor/http/models/task.rb', line 150 def in_progress? %w[IN_PROGRESS SCHEDULED].include?(status) end |
#terminal? ⇒ Boolean
Check if task is in terminal state
132 133 134 |
# File 'lib/conductor/http/models/task.rb', line 132 def terminal? %w[COMPLETED FAILED FAILED_WITH_TERMINAL_ERROR CANCELED TIMED_OUT SKIPPED].include?(status) end |