🚀 New! Kestra raises $3 million to grow Learn more

Worker Worker- 🔒 Deprecated

yaml
type: "io.kestra.core.tasks.flows.Worker"

Run tasks sequentially sharing the same filesystem

This task is deprecated, please use the io.kestra.core.tasks.flows.WorkingDirectory task instead.

Examples

yaml
id: worker
namespace: io.kestra.tests

tasks:
  - id: worker
    type: io.kestra.core.tasks.flows.Worker
    tasks:
      - id: first
        type: io.kestra.plugin.scripts.shell.Commands
        commands:
        - 'echo "{{ taskrun.id }}" > {{ workingDir }}/stay.txt'
      - id: second
        type: io.kestra.plugin.scripts.shell.Commands
        commands:
        - |
          echo '::{"outputs": {"stay":"'$(cat {{ workingDir }}/stay.txt)'"}}::'

Properties

tasks

  • Type: array
  • SubType: Task
  • Dynamic:
  • Required: ✔️
  • Min items: 1

cache

  • Type: Cache
  • Dynamic:
  • Required:

Cache configuration

When a cache is configured, an archive of the files denoted by the cache configuration is created at the end of the execution of the task and saved in Kestra's internal storage. Then at the beginning of the next execution of the task, the archive of the files is retrieved and the working directory initialized with it.

errors

  • Type: array
  • SubType: Task
  • Dynamic:
  • Required:

List of tasks to run if any tasks failed on this FlowableTask

namespaceFiles

Inject namespace files

Inject namespace files to this task. When enabled, it will, by default, load all namespace files into the working directory. However, you can use the include or exclude properties to limit which namespace files will be injected.

Definitions

NamespaceFiles

enabled

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: true

Whether to enable namespace files to be loaded into the working directory. If explicitly set to true in a task, it will load all Namespace Files into the task's working directory. Note that this property is by default set to true so that you can specify only the include and exclude properties to filter the files to load without having to explicitly set enabled to true.

exclude

  • Type: array
  • SubType: string
  • Dynamic:
  • Required:

A list of filters to exclude matching glob patterns. This allows you to exclude a subset of the Namespace Files from being downloaded at runtime. You can combine this property together with include to only inject a subset of files that you need into the task's working directory.

include

  • Type: array
  • SubType: string
  • Dynamic:
  • Required:

A list of filters to include only matching glob patterns. This allows you to only load a subset of the Namespace Files into the working directory.

Cache

patterns

  • Type: array
  • SubType: string
  • Dynamic:
  • Required: ✔️

List of file glob patterns to include in the cache.

For example 'node_modules/**' will include all files of the node_modules directory including sub-directories.

ttl

  • Type: string
  • Dynamic:
  • Required:
  • Format: duration

Cache TTL (Time To Live), after this duration the cache will be deleted.