Reference documentation and code samples for the Batch V1 API class Google::Cloud::Batch::V1::TaskSpec.
Spec of a task
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#compute_resource
def compute_resource() -> ::Google::Cloud::Batch::V1::ComputeResource
- (::Google::Cloud::Batch::V1::ComputeResource) — ComputeResource requirements.
#compute_resource=
def compute_resource=(value) -> ::Google::Cloud::Batch::V1::ComputeResource
- value (::Google::Cloud::Batch::V1::ComputeResource) — ComputeResource requirements.
- (::Google::Cloud::Batch::V1::ComputeResource) — ComputeResource requirements.
#environment
def environment() -> ::Google::Cloud::Batch::V1::Environment
- (::Google::Cloud::Batch::V1::Environment) — Environment variables to set before running the Task.
#environment=
def environment=(value) -> ::Google::Cloud::Batch::V1::Environment
- value (::Google::Cloud::Batch::V1::Environment) — Environment variables to set before running the Task.
- (::Google::Cloud::Batch::V1::Environment) — Environment variables to set before running the Task.
#environments
def environments() -> ::Google::Protobuf::Map{::String => ::String}
- (::Google::Protobuf::Map{::String => ::String}) — Deprecated: please use environment(non-plural) instead.
#environments=
def environments=(value) -> ::Google::Protobuf::Map{::String => ::String}
- value (::Google::Protobuf::Map{::String => ::String}) — Deprecated: please use environment(non-plural) instead.
- (::Google::Protobuf::Map{::String => ::String}) — Deprecated: please use environment(non-plural) instead.
#lifecycle_policies
def lifecycle_policies() -> ::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>
- (::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>) — 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.
#lifecycle_policies=
def lifecycle_policies=(value) -> ::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>
- value (::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>) — 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.
- (::Array<::Google::Cloud::Batch::V1::LifecyclePolicy>) — 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.
#max_retry_count
def max_retry_count() -> ::Integer
- (::Integer) — Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].
#max_retry_count=
def max_retry_count=(value) -> ::Integer
- value (::Integer) — Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].
- (::Integer) — Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].
#max_run_duration
def max_run_duration() -> ::Google::Protobuf::Duration
- (::Google::Protobuf::Duration) — Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.
#max_run_duration=
def max_run_duration=(value) -> ::Google::Protobuf::Duration
- value (::Google::Protobuf::Duration) — Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.
- (::Google::Protobuf::Duration) — Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.
#runnables
def runnables() -> ::Array<::Google::Cloud::Batch::V1::Runnable>
-
(::Array<::Google::Cloud::Batch::V1::Runnable>) — The sequence of scripts or containers to run for this Task. Each Task using
this TaskSpec executes its list of runnables in order. The Task succeeds if
all of its runnables either exit with a zero status or any that exit with a
non-zero status have the ignore_exit_status flag.
Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.
#runnables=
def runnables=(value) -> ::Array<::Google::Cloud::Batch::V1::Runnable>
-
value (::Array<::Google::Cloud::Batch::V1::Runnable>) — The sequence of scripts or containers to run for this Task. Each Task using
this TaskSpec executes its list of runnables in order. The Task succeeds if
all of its runnables either exit with a zero status or any that exit with a
non-zero status have the ignore_exit_status flag.
Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.
-
(::Array<::Google::Cloud::Batch::V1::Runnable>) — The sequence of scripts or containers to run for this Task. Each Task using
this TaskSpec executes its list of runnables in order. The Task succeeds if
all of its runnables either exit with a zero status or any that exit with a
non-zero status have the ignore_exit_status flag.
Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.
#volumes
def volumes() -> ::Array<::Google::Cloud::Batch::V1::Volume>
- (::Array<::Google::Cloud::Batch::V1::Volume>) — Volumes to mount before running Tasks using this TaskSpec.
#volumes=
def volumes=(value) -> ::Array<::Google::Cloud::Batch::V1::Volume>
- value (::Array<::Google::Cloud::Batch::V1::Volume>) — Volumes to mount before running Tasks using this TaskSpec.
- (::Array<::Google::Cloud::Batch::V1::Volume>) — Volumes to mount before running Tasks using this TaskSpec.