Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transport/cython-conductor: Do not raise CancelledErrors (fixes hanging recoveries for cython version) #571

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions faust/transport/_cython/conductor.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ cdef class ConductorHandler:
continue
delivered.add(chan)
if full:
for event, chan in full:
self.on_topic_buffer_full(chan)
await chan.put(event)
delivered.add(chan)
await wait([self._handle_full(event, chan, delivered)
for event, chan in full],
return_when=ALL_COMPLETED)
except KeyDecodeError as exc:
remaining = channels - delivered
message.ack(self.consumer, n=len(remaining))
Expand All @@ -73,6 +72,11 @@ cdef class ConductorHandler:
await channel.on_value_decode_error(exc, message)
delivered.add(channel)

async def _handle_full(self, event, chan, delivered):
self.on_topic_buffer_full(chan)
await chan.put(event)
delivered.add(chan)

cdef object _decode(self, object event, object channel, object event_keyid):
keyid = channel.key_type, channel.value_type
if event_keyid is None or event is None:
Expand Down