Auto-end PipelineRunner.run() when all root workers finish
run() now defaults to auto_end=True: the runner ends once every root worker has finished, so single-pipeline bots end naturally when their pipeline does and tests no longer need an explicit runner.end() call. Multi-worker bots whose helpers run forever still trigger shutdown via end() / cancel() from an event handler (typically on transport disconnect). Hosts that add and remove workers across many sessions can pass auto_end=False to keep the runner up.
This commit is contained in:
1
changelog/4493.changed.3.md
Normal file
1
changelog/4493.changed.3.md
Normal file
@@ -0,0 +1 @@
|
||||
- `PipelineRunner.run()` now ends automatically once every root worker has finished, so single-pipeline bots no longer need an explicit `runner.end()` / `runner.cancel()` call. Multi-worker bots whose helpers run forever (waiting for bus messages) still trigger shutdown by calling `end()` / `cancel()` from an event handler (typically on transport disconnect). Pass `auto_end=False` to `run()` for long-lived hosts (e.g. a FastAPI server) that add and remove workers across many sessions.
|
||||
@@ -1 +1 @@
|
||||
- Passing a worker to `PipelineRunner.run()` is deprecated. Register the worker with `PipelineRunner.add_workers()` before calling `run()` instead; `run()` now blocks until `end()` / `cancel()` is called rather than until the passed worker finishes. The `worker` argument still works but emits a `DeprecationWarning` and will be removed in a future release.
|
||||
- Passing a worker to `PipelineRunner.run()` is deprecated. Register the worker with `PipelineRunner.add_workers()` before calling `run()` instead. The `worker` argument still works but emits a `DeprecationWarning` and will be removed in a future release.
|
||||
|
||||
Reference in New Issue
Block a user