Rename PipelineRunner.add_worker() to variadic add_workers(*workers)

Lets callers register multiple workers in a single call instead of
awaiting add_worker() repeatedly. Updates all examples, docs, tests,
and proxy worker docstrings to use the new API.
This commit is contained in:
Aleix Conchillo Flaqué
2026-05-21 19:45:47 -07:00
parent f91179a640
commit e8ec7c585f
13 changed files with 58 additions and 62 deletions

View File

@@ -161,8 +161,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
logger.info("Client disconnected")
await runner.cancel()
await runner.add_worker(CodeWorker("code_worker", project_path=PROJECT_PATH))
await runner.add_worker(worker)
await runner.add_workers(CodeWorker("code_worker", project_path=PROJECT_PATH), worker)
await runner.run()