Skip to content

Conversation

@petyaslavova
Copy link
Collaborator

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Please provide a description of the change here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the claim_min_idle_time parameter to the xreadgroup command in Redis, enabling automatic claiming of pending messages based on their idle time. This feature allows consumers to reclaim messages from other consumers that have been pending for a specified duration.

  • Added claim_min_idle_time parameter to the xreadgroup method in redis/commands/core.py
  • Modified response parsers to handle extended message format with idle time and delivery count when using claim_min_idle_time
  • Added comprehensive test coverage for single and multiple stream scenarios in both sync and async test files

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 26 comments.

File Description
redis/commands/core.py Added claim_min_idle_time parameter with validation and command building logic
redis/_parsers/helpers.py Updated parsers to handle extended response format including idle time and delivery count
tests/test_commands.py Added three test methods and helper validation function for the new feature in sync mode
tests/test_asyncio/test_commands.py Added three test methods and helper validation function for the new feature in async mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

petyaslavova and others added 16 commits October 31, 2025 19:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix spelling error.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix spelling error.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix spelling error.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This assignment to 'res' is unnecessary as it is redefined before this value is used.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@petyaslavova petyaslavova force-pushed the ps_add_claim_arg_in_xreadgroup branch from 61ab6c9 to b1ceca5 Compare October 31, 2025 17:46
@petyaslavova petyaslavova added the feature New feature label Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants