Class: Google::Apis::BatchV1::LifecyclePolicy
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::LifecyclePolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb
Overview
LifecyclePolicy describes how to deal with task failures based on different conditions.
Instance Attribute Summary collapse
-
#action ⇒ String
Action to execute when ActionCondition is true.
-
#action_condition ⇒ Google::Apis::BatchV1::ActionCondition
Conditions for actions to deal with task failures.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LifecyclePolicy
constructor
A new instance of LifecyclePolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LifecyclePolicy
Returns a new instance of LifecyclePolicy.
1404 1405 1406 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1404 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ String
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.
Corresponds to the JSON property action
1397 1398 1399 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1397 def action @action end |
#action_condition ⇒ Google::Apis::BatchV1::ActionCondition
Conditions for actions to deal with task failures.
Corresponds to the JSON property actionCondition
1402 1403 1404 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1402 def action_condition @action_condition end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1409 1410 1411 1412 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1409 def update!(**args) @action = args[:action] if args.key?(:action) @action_condition = args[:action_condition] if args.key?(:action_condition) end |