Skip to content

fix: close(immediate) and dequeue_event exceptions for EventConsumer compatibility#13

Open
TadakiAsechi wants to merge 2 commits intoredis-developer:mainfrom
TadakiAsechi:fix/close-immediate-and-dequeue-exceptions
Open

fix: close(immediate) and dequeue_event exceptions for EventConsumer compatibility#13
TadakiAsechi wants to merge 2 commits intoredis-developer:mainfrom
TadakiAsechi:fix/close-immediate-and-dequeue-exceptions

Conversation

@TadakiAsechi
Copy link
Copy Markdown

Summary

Adds close(immediate: bool) to RedisStreamsEventQueue ( Fixes #11 )
and aligns dequeue_event() with EventConsumer (TimeoutError / QueueEmpty). ( Fixes #12 )

Changes

  • Close:
    • close(immediate=True) runs pending cleanup (xpending_range + xack);
    • immediate=False sets _closing only.
    • New _close_pending_cleanup();
    • manager.close() calls queue.close(immediate=True).
  • Dequeue:
    • dequeue_event() raises asyncio.TimeoutError or asyncio.QueueEmpty (no RuntimeError wrap).

Testing

pytest tests/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dequeue_event() raises RuntimeError; EventConsumer expects TimeoutError/QueueEmpty close(True) causes TypeError; final task state not persisted

1 participant