-
Notifications
You must be signed in to change notification settings - Fork 2
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
Branch 3.0.0 v1 #57
base: dev
Are you sure you want to change the base?
Branch 3.0.0 v1 #57
Changes from all commits
8b80e3a
c9d9dcc
ebf98b2
4f03072
04a2a31
57b7829
76ee876
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
from .. import types | ||
from .internal import channel_provider | ||
from ..shared.admin_helpers import BaseClient | ||
from ..types import IndexStatusResponse | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
@@ -308,7 +309,7 @@ async def index_get( | |
|
||
async def index_get_status( | ||
self, *, namespace: str, name: str, timeout: Optional[int] = None | ||
) -> int: | ||
) -> types.IndexStatusResponse: | ||
""" | ||
Retrieve the number of records queued to be merged into an index. | ||
|
||
|
@@ -349,7 +350,7 @@ async def index_get_status( | |
logger.error("Failed to get index status with error: %s", e) | ||
raise types.AVSServerError(rpc_error=e) | ||
|
||
return self._respond_index_get_status(response) | ||
return IndexStatusResponse.from_proto_response(response) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it makes more sense to have a separate helper method that creates an IndexStatusResponse from the proto response rather than a method on IndexStatusResponse. I think this because the method will be exposed to the user but the user is not concerned with how we create the object from a proto response. |
||
|
||
async def add_user( | ||
self, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I think it makes more sense to have a separate helper method that creates an IndexStatusResponse from the proto response rather than a method on IndexStatusResponse. I think this because the method will be exposed to the user but the user is not concerned with how we create the object from a proto response.