feat: add tracking logs#1
Conversation
b5e3d4d to
c450d9f
Compare
329502f to
d0f60e3
Compare
d0f60e3 to
ead8f61
Compare
|
|
||
| return obj, is_new | ||
|
|
||
| @staticmethod |
There was a problem hiding this comment.
The idea of this static method is to reuse the function class in whatever place?
There was a problem hiding this comment.
The method doesn't need the self(instance) or cls(class reference) therefore by definition it's a static method, so when I implemented that I didn't intend to create a function to be used in multiple places it's just a static method that could be used in other context
completion_aggregator/models.py
Outdated
| updated_aggregators: List of Aggregator intances | ||
|
|
||
| """ | ||
| for obj in updated_aggregators: |
There was a problem hiding this comment.
Why you change to obj if in other places is agregator.
There was a problem hiding this comment.
I understand your concern and IMO it's much better aggregator however your argument is not valid since in other places is obj
completion_aggregator/models.py
Outdated
| "created": obj.created, | ||
| "earned": obj.earned, | ||
| "possible": obj.possible, | ||
| "percent": obj.percent, |
There was a problem hiding this comment.
This doesnt need anything change.
I mean this serializer is ok?
There was a problem hiding this comment.
That method just validates the kind of event (progress or completion) the data that is sent must be as accurate as possible
| # the block type should be removed or added from the progress or completion list. | ||
| settings.ALLOWED_COMPLETION_AGGREGATOR_EVENT_TYPES = { | ||
| "progress": [ | ||
| "progress": { |
There was a problem hiding this comment.
Description:
This pr adds the capability of publishing aggregator events
Testing instructions:
Reviewers:
Merge checklist:
Post merge:
finished.
Author concerns: List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.