Skip to content

dequeue_event() raises RuntimeError; EventConsumer expects TimeoutError/QueueEmpty #12

@TadakiAsechi

Description

@TadakiAsechi

Problem: When no events are available, dequeue_event() raises RuntimeError. EventConsumer expects asyncio.TimeoutError (to keep polling) or asyncio.QueueEmpty (when no_wait or queue closed), so behavior can be wrong (e.g. early exit).

Cause: RedisStreamsEventQueue.dequeue_event() wraps "no events" in RuntimeError instead of raising the exception types the SDK uses for control flow.

Fix: Raise asyncio.TimeoutError when no events and no_wait=False; raise asyncio.QueueEmpty when no events and no_wait=True, or when queue is closed. Re-raise these instead of wrapping in RuntimeError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions