public class TaskDefinitionResponse extends Object
Definition of a task that can be scheduled
| Modifier and Type | Class and Description |
|---|---|
class |
TaskDefinitionResponse.Metadata
Required task metadata
|
| Modifier and Type | Field and Description |
|---|---|
Date |
created
Creation time of task
|
Date |
deadline
Deadline of the task,
pending and running runs are resolved as failed if not resolved by other means before the deadline. |
String[] |
dependencies
List of dependent tasks.
|
Date |
expires
Task expiration, time at which task definition and status is deleted.
|
Object |
extra
Object with properties that can hold any kind of extra data that should be associated with the task.
|
TaskDefinitionResponse.Metadata |
metadata |
Object |
payload
Task-specific payload following worker-specific format.
|
String |
priority
Priority of task, this defaults to
normal and the scope queue:task-priority:high is required to define a task with priority set to high. |
String |
provisionerId
Unique identifier for a provisioner, that can supply specified
workerType |
String |
requires
The tasks relation to its dependencies.
|
int |
retries
Number of times to retry the task in case of infrastructure issues.
|
String[] |
routes
List of task specific routes, AMQP messages will be CC’ed to these routes.
|
String |
schedulerId
Identifier for the scheduler that defined this task, this can be an identifier for a user or a service like the
"task-graph-scheduler". |
String[] |
scopes
List of scopes (or scope-patterns) that the task is authorized to use.
|
Object |
tags
Arbitrary key-value tags (only strings limited to 4k).
|
String |
taskGroupId
Identifier for a group of tasks scheduled together with this task, by scheduler identified by
schedulerId. |
String |
workerType
Unique identifier for a worker-type within a specific provisioner
|
| Constructor and Description |
|---|
TaskDefinitionResponse() |
public Date created
Creation time of task
public Date deadline
Deadline of the task, pending and running runs are resolved as failed if not resolved by other means before the deadline. Note, deadline cannot be more than 5 days into the future
public String[] dependencies
List of dependent tasks. These must either be completed or resolved before this task is scheduled. See requires for semantics.
public Date expires
Task expiration, time at which task definition and status is deleted. Notice that all artifacts for the must have an expiration that is no later than this. If this property isn’t it will be set to deadline plus one year (this default may subject to change).
public Object extra
Object with properties that can hold any kind of extra data that should be associated with the task. This can be data for the task which doesn’t fit into payload, or it can supplementary data for use in services listening for events from this task. For example this could be details to display on treeherder, or information for indexing the task. Please, try to put all related information under one property, so extra data keys for treeherder reporting and task indexing don’t conflict, hence, we have reusable services. Warning, do not stuff large data-sets in here, task definitions should not take-up multiple MiBs.
public TaskDefinitionResponse.Metadata metadata
public Object payload
Task-specific payload following worker-specific format. For example the docker-worker requires keys like: image, commands and features. Refer to the documentation of docker-worker for details.
public String priority
Priority of task, this defaults to normal and the scope queue:task-priority:high is required to define a task with priority set to high. Additional priority levels may be added later.
public String provisionerId
Unique identifier for a provisioner, that can supply specified workerType
public String requires
The tasks relation to its dependencies. This property specifies the semantics of the task.dependencies property. If all-completed is given the task will be scheduled when all dependencies are resolved completed (successful resolution). If all-resolved is given the task will be scheduled when all dependencies have been resolved, regardless of what their resolution is.
public int retries
Number of times to retry the task in case of infrastructure issues. An infrastructure issue is a worker node that crashes or is shutdown, these events are to be expected.
public String[] routes
List of task specific routes, AMQP messages will be CC’ed to these routes.
public String schedulerId
Identifier for the scheduler that defined this task, this can be an identifier for a user or a service like the "task-graph-scheduler". Along with the taskGroupId this is used to form the permission scope queue:assume:scheduler-id:<schedulerId>/<taskGroupId>, this scope is necessary to schedule a defined task, or rerun a task.
public String[] scopes
List of scopes (or scope-patterns) that the task is authorized to use.
public Object tags
Arbitrary key-value tags (only strings limited to 4k). These can be used to attach informal meta-data to a task. Use this for informal tags that tasks can be classified by. You can also think of strings here as candidates for formal meta-data. Something like purpose: 'build' || 'test' is a good example.
public String taskGroupId
Identifier for a group of tasks scheduled together with this task, by scheduler identified by schedulerId. For tasks scheduled by the task-graph scheduler, this is the taskGraphId. Defaults to taskId if property isn’t specified.
public String workerType
Unique identifier for a worker-type within a specific provisioner
Copyright © 2014–2016 Mozilla. All rights reserved.