-
Notifications
You must be signed in to change notification settings - Fork 716
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
Distributed error reporting: Task to ping telemetry with all the tracked errors #12357
Distributed error reporting: Task to ping telemetry with all the tracked errors #12357
Conversation
Build Artifacts
|
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.
Hi @thesujai! Great work. I left a few comments to improve the code.
Resolved all reviews |
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.
LGTM! @rtibbles any other thoughts on the ping task?
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.
Some possible cleanup that might be good here.
Done with the cleaup |
kolibri/core/errorreports/tasks.py
Outdated
return json.dumps(errors_list, cls=DjangoJSONEncoder) | ||
|
||
|
||
def mark_errors_as_sent(errors): |
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.
Theres not much benefit in having this as a method of its own. We can perform the queryset update within the ping_error_reports
task. Richard previous asked about this!
kolibri/core/errorreports/tasks.py
Outdated
data=errors_json, | ||
headers={"Content-Type": "application/json"}, | ||
) | ||
mark_errors_as_sent(errors) |
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.
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.
Changes made! Thanks @thesujai
2d89272
into
learningequality:distributed-error-reporting
Summary
ping_error_reports
that will post to telemetryping_error_reports
when _ping is successful, else do nothingReferences
Closes #12356
Reviewer guidance
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)