Track dedupe index file size in org storage stats#3207
Conversation
| ): | ||
| """update dedupe index stats for specified collection""" | ||
| self.collections.find_one_and_update( | ||
| await self.collections.find_one_and_update( |
There was a problem hiding this comment.
whoa, i'm surprised this was missed before by mypy, and no warnings about it either?
There was a problem hiding this comment.
I think it's because there's no return to check the type of. mypy doesn't seem to be making sure that async methods are awaited generally, at least with how we set it up.
There was a problem hiding this comment.
Seems to be a contentious issue over in the mypy repo issues: python/mypy#2499
There was a problem hiding this comment.
This might require some changes in our codebase (there are lots of places where we await without doing anything with the return value of async methods) but this could help: https://mypy.readthedocs.io/en/stable/error_code_list2.html#check-that-awaitable-return-value-is-used-unused-awaitable
There was a problem hiding this comment.
Hm, this may have more unintended consequence, does adding a return type help generally?
793048b to
0e18f0b
Compare
|
Had to resolve some merge conflicts rebasing on main but should be set for re-review now |
ikreymer
left a comment
There was a problem hiding this comment.
Looks good! Thanks for additional type fixes as well!
Fixes #3206
Backend changes
awaitthat was missing in method for updating index stateFrontend changes