chore: Bump taskiq-redis to 1.2.3 and redis to 8.1.0 - #330
Merged
Felipe Alvarado (falvaradorodriguez) merged 1 commit intoAug 19, 2026
Merged
Conversation
Felipe Alvarado (falvaradorodriguez)
requested a review
from a team
as a code owner
August 19, 2026 08:42
Moisés (moisses89)
approved these changes
Aug 19, 2026
Felipe Alvarado (falvaradorodriguez)
deleted the
chore/bump-taskiq-redis-1.2.3
branch
August 19, 2026 09:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong? 👾
taskiq-redis1.2.2 has a race condition inRedisStreamBroker.listen(): the lock check guarding thexautoclaimpath is not atomic, so two workers can claim the same pending message and execute the same task twice.Reported upstream as taskiq-python/taskiq-redis#123, where the reporter notes it "increases the probability of duplicate task execution beyond the natural at-least-once guarantees of Redis Streams" and that they saw it more than once per minute.
For us this also inflates task volume: a duplicated get_contract_metadata_task double-enqueues the proxy implementation (app/workers/tasks.py:134).
How was it fixed? 🎯
Bump taskiq-redis 1.2.2 → 1.2.3, which makes the lock acquisition and XAUTOCLAIM atomic (PR #126).
1.2.3 requires redis>=8.0.0,<9, so the Python client goes 7.4.0 → 8.1.0. To be explicit: that is redis-py, not the Redis server, which stays on 7.4.10 — the matching version numbers are a coincidence. Verified redis-py 8.1.0 talking to a 7.4.10 server.
The only fallout from the client major was one now-obsolete # type: ignore[misc] in app/datasources/cache/redis.py: redis-py 8.1.0 types hget correctly, and warn_unused_ignores = true turns the leftover ignore into an error.