Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

TaskSpec

import type { TaskSpec } from "https://googleapis.deno.dev/v1/batch:v1.ts";

Spec of a task

interface TaskSpec {
computeResource?: ComputeResource;
environment?: Environment;
environments?: {
[key: string]: string;
}
;
lifecyclePolicies?: LifecyclePolicy[];
maxRetryCount?: number;
maxRunDuration?: number;
runnables?: Runnable[];
volumes?: Volume[];
}

§Properties

§
computeResource?: ComputeResource
[src]

ComputeResource requirements.

§
environment?: Environment
[src]

Environment variables to set before running the Task.

§
environments?: {
[key: string]: string;
}
[src]

Deprecated: please use environment(non-plural) instead.

§
lifecyclePolicies?: LifecyclePolicy[]
[src]

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?: number
[src]

Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].

§
maxRunDuration?: number
[src]

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. The valid value range for max_run_duration in seconds is [0, 315576000000.999999999],

§
runnables?: Runnable[]
[src]

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?: Volume[]
[src]

Volumes to mount before running Tasks using this TaskSpec.