def Client.runner(
  cluster: ClusterSlugLike,
  tasks: list[type[Task]],
  cache: JobCache | None = None
) -> TaskRunner

Initialize a task runner.

Parameters

cluster
str

The cluster slug for the cluster associated with this task runner.

tasks
list[type[Task]]

A list of task classes that this runner can execute.

cache
JobCache

An optional job cache for caching results from tasks and sharing data between tasks.