-
Notifications
You must be signed in to change notification settings - Fork 27
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
make subscription data calls more efficient #1538
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1538 +/- ##
==========================================
+ Coverage 91.78% 91.82% +0.03%
==========================================
Files 120 120
Lines 15623 15623
==========================================
+ Hits 14340 14346 +6
+ Misses 1283 1277 -6
|
Thanks for review, even if I didn't ask for it @haakonvt !
|
Yup, I agree!
Sounds great 👌 Not sure what you mean with "python defaults to seconds" though? Your docstring description is very clear.
Yeah, for sure an improvement! Particularly for our |
In java and other languages, timestamps are often measured in milliseconds. So a variable named timeout could be thought to be given in milliseconds, unless it is named timeoutSeconds. Witch is also the name in the API itself. However, in python, I have the impression that time is measured in seconds, unless specified otherwise. Anyway, if you are happy, I am happy :) |
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.
In java and other languages, timestamps are often measured in milliseconds. So a variable named timeout could be thought to be given in milliseconds, unless it is named timeoutSeconds. Witch is also the name in the API itself.
However, in python, I have the impression that time is measured in seconds, unless specified otherwise.
Anyway, if you are happy, I am happy :)
Today I learned! At least epoch time is given in float sec (time.time()
). Looks very good to me!
Description
Use a more efficient method to query the subscription list data API
The timeout parameter will enable active wait:
Until there is more data available, we will keep the request waiting in the backend. Only when the timeout has expired, we will return.
Not a visible change to the user; no need to update version or changelog?
Checklist:
Tests added/updated.If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.