FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: `prefetcher` leaks one message at `max_tasks_to_execute` boundary by PythonFZ · Pull Request #630 · taskiq-python/taskiq · GitHub

fix: prefetcher leaks one message at max_tasks_to_execute boundary - #630

Open
PythonFZ wants to merge 7 commits into
taskiq-python:masterfrom
PythonFZ:fix-prefetcher-leak-on-max-tasks
Open

fix: prefetcher leaks one message at max_tasks_to_execute boundary#630
PythonFZ wants to merge 7 commits into
taskiq-python:masterfrom
PythonFZ:fix-prefetcher-leak-on-max-tasks

Conversation

Copy link
Copy Markdown

Fix using max_tasks_to_execute causes the prefetcher to pop tasks from the queue it has no intention of processing.

Closes #528.

s3rius commented Jun 29, 2026
edited
Loading

Copy link
Copy Markdown
Member

Hello. Thanks for your contribution. However, I'd love to move try inside the while loop, because in case of any error prefetcher will stop working completely which will make worker to hang. It might happen, because of asyncio.wait for example.

PythonFZ commented Jun 29, 2026
edited
Loading

Copy link
Copy Markdown
Author

Hello. Thanks for your contribution. However, I'd love to move try inside the while loop, because in case of any error prefetcher will stop working completely which will make worker to hang. It might happen, because of asyncio.wait for example.

That is a good point, I added a broad try ... except Exception in 592b167 and a test for transient listening failures in adeb379

Does that work for you or are there any concerns with calling iterator = self.broker.listen() in the exception handling?

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 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.

max-prefetch argument doesn't work as expected

2 participants


Back | FazBrowse Home | New Git URL