prefect.task_runners
Classes
TaskRunner
Abstract base class for task runners.
A task runner is responsible for submitting tasks to the task run engine running
in an execution environment. Submitted tasks are non-blocking and return a future
object that can be used to wait for the task to complete and retrieve the result.
Task runners are context managers and should be used in a with block to ensure
proper cleanup of resources.
Methods:
duplicate
map
task: The task to submit.parameters: The parameters to use when running the task.wait_for: A list of futures that the task depends on.
- An iterable of future objects that can be used to wait for the tasks to
- complete and retrieve the results.
name
submit
submit
submit
ThreadPoolTaskRunner
A task runner that executes tasks in a separate thread pool.
Methods:
cancel_all
duplicate
map
map
map
submit
submit
submit
task: The task to submit.parameters: The parameters to use when running the task.wait_for: A list of futures that the task depends on.
- A future object that can be used to wait for the task to complete and
- retrieve the result.
PrefectTaskRunner
Methods:
duplicate
map
map
map
submit
submit
submit
task: The task to submit.parameters: The parameters to use when running the task.wait_for: A list of futures that the task depends on.
- A future object that can be used to wait for the task to complete and
- retrieve the result.