Task

Anatomy of a Task

A task is one of basic components of Computes. It is an immutable description of the unique task to run, utilizing IPLD links to keep the file compact. The primary components of a task are the input, taskDefinition, and status. A task is the unique combination of these three components. Many tasks can share the same taskDefinition but should not share the same input and status link.

Example Task

{
  "input": {
    "dataset": {
      "/": "zdpuAxC1mnb6USNY8psFA2fowsDrngsFNefMx42TX9ZDjLvVr"
    },
    "path": "split/input"
  },
  "taskDefinition": {
    "/": "zdpuAsJ7Q2X9HPqjvSLzxCHchy8fJvXHWThCjLjwx7Tktc9hk"
  },
  "status": {
    "/": "zdpuAw6SZi6Xsw4iuczZKP7A6wcbHF7UZY9duokXyKqmPau8c"
  }
}

Input

The contents of the merkle-link will be assembled into a Grow Only Hash Object and passed as input to the Task Runner.

Task Definition

The Task Definition is a merkle-link that contains the details of the actual work to perform.

Status

The status is a Grow Only Hash Object that contains metadata about the execution of the task in Computes. Timestamps, errors, and important events can be found here.