Deprecate passing a worker to PipelineRunner.run()
Register the worker with PipelineRunner.add_workers() before calling run() instead. The worker argument still works but now emits a DeprecationWarning and will be removed in a future release. Update the runner docstrings, the run_test() helper, and all examples (including the asyncio.gather() forms) to use the new pattern.
This commit is contained in:
@@ -57,7 +57,8 @@ async def main():
|
||||
tk_root.update_idletasks()
|
||||
await asyncio.sleep(0.1)
|
||||
|
||||
await asyncio.gather(runner.run(worker), run_tk())
|
||||
await runner.add_workers(worker)
|
||||
await asyncio.gather(runner.run(), run_tk())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user