-
Notifications
You must be signed in to change notification settings - Fork 429
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
feat(tasks/queue-size): Implement queue_size #2826
Conversation
Implement queue size to limit tasks based on task_identifier
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
@gagantrivedi , can you please add to the description what will happen when the queue size limit is reached, as you explained in the Eng Meeting, just to have it documented here? |
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.
Added one minor comment about the implementation but I do wonder if we might be better off implementing multiple queues (with prioritisation). I don't know if it would be much more work to do that or not?
api/task_processor/models.py
Outdated
@@ -105,10 +105,22 @@ def schedule_task( | |||
cls, | |||
schedule_for: datetime, | |||
task_identifier: str, | |||
queue_size: int, |
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.
Think this should be queue_size: Optional[int]
?
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.
This should be a temporary measure until we can deprecate these tasks entirely.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2826 +/- ##
=======================================
Coverage 95.53% 95.53%
=======================================
Files 994 994
Lines 28072 28095 +23
=======================================
+ Hits 26818 26840 +22
- Misses 1254 1255 +1
☔ View full report in Codecov by Sentry. |
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingChanges
Implement queue size to limit low priority tasks from overwhelming the queue
Plan and SQL:
How did you test this code?
Adds unit test cases