Class: Google::Cloud::Batch::V1::LifecyclePolicy

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/batch/v1/task.rb

Overview

LifecyclePolicy describes how to deal with task failures based on different conditions.

Defined Under Namespace

Modules: Action Classes: ActionCondition

Instance Attribute Summary collapse

Instance Attribute Details

#action::Google::Cloud::Batch::V1::LifecyclePolicy::Action

Returns Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.

Returns:

  • (::Google::Cloud::Batch::V1::LifecyclePolicy::Action)

    Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 293

class LifecyclePolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Conditions for actions to deal with task failures.
  # @!attribute [rw] exit_codes
  #   @return [::Array<::Integer>]
  #     Exit codes of a task execution.
  #     If there are more than 1 exit codes,
  #     when task executes with any of the exit code in the list,
  #     the condition is met and the action will be executed.
  class ActionCondition
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Action on task failures based on different conditions.
  module Action
    # Action unspecified.
    ACTION_UNSPECIFIED = 0

    # Action that tasks in the group will be scheduled to re-execute.
    RETRY_TASK = 1

    # Action that tasks in the group will be stopped immediately.
    FAIL_TASK = 2
  end
end

#action_condition::Google::Cloud::Batch::V1::LifecyclePolicy::ActionCondition

Returns Conditions that decide why a task failure is dealt with a specific action.

Returns:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 293

class LifecyclePolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Conditions for actions to deal with task failures.
  # @!attribute [rw] exit_codes
  #   @return [::Array<::Integer>]
  #     Exit codes of a task execution.
  #     If there are more than 1 exit codes,
  #     when task executes with any of the exit code in the list,
  #     the condition is met and the action will be executed.
  class ActionCondition
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Action on task failures based on different conditions.
  module Action
    # Action unspecified.
    ACTION_UNSPECIFIED = 0

    # Action that tasks in the group will be scheduled to re-execute.
    RETRY_TASK = 1

    # Action that tasks in the group will be stopped immediately.
    FAIL_TASK = 2
  end
end