Runner object and call Runner.connect_to when you want direct execution. The Client.runner method remains available for existing code and simple direct runner scripts.
Parameters
str | None
The cluster slug for the cluster associated with this direct runner.
If not provided, the default cluster is used.
list[type[Task]] | None
A list of task classes that this runner can execute. Pass either
tasks, cache, and context, or pass a reusable runner object.type[RunnerContext] | None
Optional runner context class to instantiate for task execution.
Runner | None
A reusable runner definition. If provided, do not also pass
tasks, cache, or context.