-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: track imdb retry queue persistence #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 refactors the IMDb retry queue to use a tracked queue structure that maintains persistence-safe serialization. Instead of relying on asyncio's internal _queue attribute, it introduces a custom _IMDbRetryQueue class that extends asyncio.Queue and maintains its own deque-based snapshot for safe persistence.
Key changes:
- Introduces
_IMDbRetryQueueclass that wraps asyncio.Queue with deque-based tracking - Updates queue loading, processing, and persistence functions to use the new tracked structure
- Adds validation for loaded JSON data format and enhanced test coverage
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| mcp_plex/loader.py | Implements _IMDbRetryQueue class and updates queue management functions |
| tests/test_loader_unit.py | Updates tests to use new queue class and adds snapshot verification |
| pyproject.toml | Bumps project version to 0.26.29 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Coverage Report
|
|||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
What
Why
queue._queuerelied on asyncio internals that could change; maintaining our own serialized view keeps persistence safe across Python versionsAffects
mcp_plex.loaderTesting
uv run ruff check .uv run pytestDocumentation
https://chatgpt.com/codex/tasks/task_e_68d2b1a69ebc83288aa841b1ad068474