Class: Google::Cloud::Batch::V1::TaskSpec
- Inherits:
-
Object
- Object
- Google::Cloud::Batch::V1::TaskSpec
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/batch/v1/task.rb
Overview
Spec of a task
Defined Under Namespace
Classes: EnvironmentsEntry
Instance Attribute Summary collapse
-
#compute_resource ⇒ ::Google::Cloud::Batch::V1::ComputeResource
ComputeResource requirements.
-
#environment ⇒ ::Google::Cloud::Batch::V1::Environment
Environment variables to set before running the Task.
-
#environments ⇒ ::Google::Protobuf::Map{::String => ::String}
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#lifecycle_policies ⇒ ::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>
Lifecycle management schema when any task in a task group is failed.
-
#max_retry_count ⇒ ::Integer
Maximum number of retries on failures.
-
#max_run_duration ⇒ ::Google::Protobuf::Duration
Maximum duration the task should run before being automatically retried (if enabled) or automatically failed.
-
#runnables ⇒ ::Array<::Google::Cloud::Batch::V1::Runnable>
Required.
-
#volumes ⇒ ::Array<::Google::Cloud::Batch::V1::Volume>
Volumes to mount before running Tasks using this TaskSpec.
Instance Attribute Details
#compute_resource ⇒ ::Google::Cloud::Batch::V1::ComputeResource
Returns ComputeResource requirements.
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 417 class TaskSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#environment ⇒ ::Google::Cloud::Batch::V1::Environment
Returns Environment variables to set before running the Task.
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 417 class TaskSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#environments ⇒ ::Google::Protobuf::Map{::String => ::String}
This field is deprecated and may be removed in the next major version update.
Returns Deprecated: please use environment(non-plural) instead.
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 417 class TaskSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#lifecycle_policies ⇒ ::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>
Returns Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 417 class TaskSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#max_retry_count ⇒ ::Integer
Returns Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 417 class TaskSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#max_run_duration ⇒ ::Google::Protobuf::Duration
Returns Maximum duration the task should run before being automatically retried
(if enabled) or automatically failed. Format the value of this field
as a time limit in seconds followed by s
—for example, 3600s
for 1 hour. The field accepts any value between 0 and the maximum listed
for the Duration
field type at
https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
the actual maximum run time for a job will be limited to the maximum run
time for a job listed at
https://cloud.google.com/batch/quotas#max-job-duration.
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 417 class TaskSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#runnables ⇒ ::Array<::Google::Cloud::Batch::V1::Runnable>
Returns Required. The sequence of one or more runnables (executable scripts, executable containers, and/or barriers) for each task in this task group to run. Each task runs this list of runnables in order. For a task to succeed, all of its script and container runnables each must meet at least one of the following conditions:
- The runnable exited with a zero status.
- The runnable didn't finish, but you enabled its
background
subfield. - The runnable exited with a non-zero status, but you enabled its
ignore_exit_status
subfield.
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 417 class TaskSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#volumes ⇒ ::Array<::Google::Cloud::Batch::V1::Volume>
Returns Volumes to mount before running Tasks using this TaskSpec.
417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'proto_docs/google/cloud/batch/v1/task.rb', line 417 class TaskSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |