Skip to content

Improve the transcribing api perf // Rate limiting for persona updates, 1/day #3651

Merged
beastoin merged 2 commits into
mainfrom
hh8m2_revives
Dec 8, 2025
Merged

Improve the transcribing api perf // Rate limiting for persona updates, 1/day #3651
beastoin merged 2 commits into
mainfrom
hh8m2_revives

Conversation

@beastoin
Copy link
Copy Markdown
Collaborator

@beastoin beastoin commented Dec 8, 2025

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a rate-limiting mechanism for persona updates, restricting them to once per day. The implementation uses Redis to track the last update time for each user. While the overall approach is sound, I've identified a critical race condition in the implementation that could allow multiple updates to occur concurrently, bypassing the rate limit. My review comments focus on resolving this issue by using an atomic Redis operation to ensure the integrity of the rate-limiting feature.

Comment thread backend/database/redis_db.py
Comment thread backend/utils/apps.py
@beastoin beastoin changed the title Rate limiting for persona updates, 1/day Improve the transcribing api perf // Rate limiting for persona updates, 1/day Dec 8, 2025
@beastoin beastoin merged commit acd21f0 into main Dec 8, 2025
1 check passed
@beastoin beastoin deleted the hh8m2_revives branch December 8, 2025 15:57
Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
…s, 1/day (BasedHardware#3651)

* Rate limiting for persona updates, 1/day

* Improve the transcribing api perf
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.

1 participant