A task is a function that represents a distinct segment of work in a Giza Actions workflow. Tasks provide a way to encapsulate parts of your workflow logic in traceable, reusable units across actions.

Overview of Tasks

Tasks function similarly to regular functions: they can receive inputs, carry out tasks, and produce outputs. A Giza Actions task can accomplish almost everything that a standard Python function can.

The unique aspect of tasks is their ability to access information about upstream dependencies and the status of these dependencies before starting. This capability allows, for example, a task to wait for the completion of another task before it begins.

Tasks also benefit from Giza Actions' automated logging, which captures details of each task run, such as its duration, tags, and final state.

You can define your tasks within the same file as your action or in separate modules, importing them for use in your action definitions. It's important to note that all tasks must be initiated within an action. It is not allowed to call a task directly from another task.

Last updated