-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: add separate celery queue for usage reports #20048
Conversation
Size Change: 0 B Total Size: 2.22 MB ℹ️ View Unchanged
|
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.
Looks good!
@@ -63,6 +64,14 @@ | |||
QUERY_RETRY_DELAY = 1 | |||
QUERY_RETRY_BACKOFF = 2 | |||
|
|||
USAGE_REPORT_TASK_KWARGS = dict( | |||
queue=CeleryQueue.USAGE_REPORTS.value, |
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.
@raquelmsmith just FYI - modified this to have each task use the queue. It doesn't work to only have the parent task on its own. The task that get created also need to specify their intended queue
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.
Oh that makes sense. Thanks!
Problem
Usage reports cause a big spike in celery tasks, which then trigger an alert for the redis queue depth. We can move these to a separate queue with no alert so that they don't trigger it.
Changes
usage_report
queue👉 Stay up-to-date with PostHog coding conventions for a smoother review.
How did you test this code?