Skip to content

Commit 4fd2f54

Browse files
author
nightcityblade
committed
fix: remove outdated stop_and_shutdown_loop from Worker docstring
1 parent ff75c0b commit 4fd2f54

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

faust/worker.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,15 @@ class Worker(mode.Worker):
156156
>>> worker = Worker(app)
157157
>>> worker.execute_from_commandline()
158158
159-
3) or if you already have an event loop, calling ``await start``,
160-
but in that case *you are responsible for gracefully shutting
161-
down the event loop*::
159+
3) or if you already have an event loop, calling ``await start``::
162160
163161
async def start_worker(worker: Worker) -> None:
164162
await worker.start()
165163
166164
def manage_loop():
167165
loop = asyncio.get_event_loop_policy().get_event_loop()
168166
worker = Worker(app, loop=loop)
169-
try:
170-
loop.run_until_complete(start_worker(worker)
171-
finally:
172-
worker.stop_and_shutdown_loop()
167+
loop.run_until_complete(start_worker(worker))
173168
174169
Arguments:
175170
app: The Faust app to start.

0 commit comments

Comments
 (0)