-
Notifications
You must be signed in to change notification settings - Fork 100
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
[change] Reduced network calls in device metric flow #501 #516
Conversation
The CI is failing due to a mismatch in formatting of timestamp. In the current implementation (master branch), the datetime object gets serialized when passed to celery. Due to this, the Moreover, if we pass a timestamp string to I think we should format all incoming timestamps to the ISO format in |
7d13bc1
to
da66d98
Compare
da66d98
to
2a8f683
Compare
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 looks on the right track to me and I do not see any evident flaw in the code.
I do see 2 areas which I think we can improve: fetching metrics and charts objects now is done each time, both when reading and writing. Charts and metric objects are not written often, I believe they're written only once when they are created. From time to time another metric or chart may be written when new data comes in, therefore I think caching the DB calls to fetch these objects will help considerably to speed up execution time, both for writing and reading metrics, and is worth the bit of extra effort, can you proceed with this?
2a8f683
to
2f6807f
Compare
2f6807f
to
25e896d
Compare
Closes #501
Checks: