Skip to content

Commit efb7512

Browse files
authored
Fix missing argument
1 parent e71cf8c commit efb7512

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/howto/patterns.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ messages at one, an in-process queue can be leveraged::
101101
for message in websocket:
102102
await queue.put(message)
103103

104-
async def worker():
104+
async def worker(websocket):
105105
while True:
106106
message = await queue.get()
107107
result = await long_running_task(message)
@@ -111,7 +111,7 @@ messages at one, an in-process queue can be leveraged::
111111
async with asyncio.TaskGroup() as tg:
112112
tg.create_task(consumer_handler(websocket))
113113
for _ in range(MAX_WORKERS):
114-
tg.create_task(worker())
114+
tg.create_task(worker(websocket))
115115

116116
Registration
117117
------------

0 commit comments

Comments
 (0)