spdl.pipeline.config.set_default_background_tasks¶
- set_default_background_tasks(tasks: list[Callable[[], BackgroundTask]] | None) None[source]¶
Set the default background task factories.
Each factory is called to create a
BackgroundTaskinstance whoserun()coroutine runs alongside the pipeline stages. Tasks are cancelled when the pipeline completes. Their errors are logged but do not cause the pipeline to fail.- Parameters:
tasks – A list of background task factories, or None to unset.