Skip to content

Commit

Permalink
fix for issue 419 (#420)
Browse files Browse the repository at this point in the history
* fix for issue 419

* Revert "fix for issue 419"

This reverts commit e68821e.

* throw in ensure_future to make sure coroutines get converted

* lint conductor.pyx

Co-authored-by: William Barnhart <[email protected]>
Co-authored-by: William Barnhart <[email protected]>
  • Loading branch information
3 people authored Jan 4, 2023
1 parent a48a7c4 commit 89b82ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions faust/transport/_cython/conductor.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cython: language_level=3
from asyncio import ALL_COMPLETED, wait
from asyncio import ALL_COMPLETED, ensure_future, wait

from faust.exceptions import KeyDecodeError, ValueDecodeError

Expand Down Expand Up @@ -75,7 +75,7 @@ cdef class ConductorHandler:
continue
delivered.add(chan)
if full:
await wait([self._handle_full(event, chan, delivered)
await wait([ensure_future(self._handle_full(event, chan, delivered))
for event, chan in full],
return_when=ALL_COMPLETED)
except KeyDecodeError as exc:
Expand Down
2 changes: 1 addition & 1 deletion faust/transport/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async def on_message(message: Message) -> None:
on_topic_buffer_full(dest_chan)
await asyncio.wait(
[
dest_chan.put(dest_event)
asyncio.ensure_future(dest_chan.put(dest_event))
for dest_event, dest_chan in full
],
return_when=asyncio.ALL_COMPLETED,
Expand Down

0 comments on commit 89b82ab

Please sign in to comment.