View Source GoogleApi.Batch.V1.Model.TaskSpec (google_api_batch v0.4.0)

Spec of a task

Attributes

  • computeResource (type: GoogleApi.Batch.V1.Model.ComputeResource.t, default: nil) - ComputeResource requirements.
  • environment (type: GoogleApi.Batch.V1.Model.Environment.t, default: nil) - Environment variables to set before running the Task.
  • environments (type: map(), default: nil) - Deprecated: please use environment(non-plural) instead.
  • lifecyclePolicies (type: list(GoogleApi.Batch.V1.Model.LifecyclePolicy.t), default: nil) - 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.
  • maxRetryCount (type: integer(), default: nil) - Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].
  • maxRunDuration (type: String.t, default: nil) - 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.
  • runnables (type: list(GoogleApi.Batch.V1.Model.Runnable.t), default: nil) - 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 (type: list(GoogleApi.Batch.V1.Model.Volume.t), default: nil) - Volumes to mount before running Tasks using this TaskSpec.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.Batch.V1.Model.TaskSpec{
  computeResource: GoogleApi.Batch.V1.Model.ComputeResource.t() | nil,
  environment: GoogleApi.Batch.V1.Model.Environment.t() | nil,
  environments: map() | nil,
  lifecyclePolicies: [GoogleApi.Batch.V1.Model.LifecyclePolicy.t()] | nil,
  maxRetryCount: integer() | nil,
  maxRunDuration: String.t() | nil,
  runnables: [GoogleApi.Batch.V1.Model.Runnable.t()] | nil,
  volumes: [GoogleApi.Batch.V1.Model.Volume.t()] | nil
}

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.