From f33aff3be1f82e1cd4e7426295c17d21af7e0cde Mon Sep 17 00:00:00 2001 From: Jeremy Shih Date: Sat, 12 Oct 2024 09:55:02 +0800 Subject: [PATCH] fix(app): rename app_service to app (#224) Because - consistency with other service client This commit - rename app_service to app --- instill/clients/client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/instill/clients/client.py b/instill/clients/client.py index 74231e5..a8e473e 100644 --- a/instill/clients/client.py +++ b/instill/clients/client.py @@ -66,7 +66,7 @@ def __init__( "Instill Artifact is not serving, Artifact functionalities will not work" ) - self.app_service = AppClient( + self.app = AppClient( api_token=api_token, url=url, secure=secure, @@ -74,7 +74,7 @@ def __init__( requester_id=requester_id, async_enabled=async_enabled, ) - if not self.app_service.is_serving(): + if not self.app.is_serving(): Logger.w("Instill App is not serving, App functionalities will not work") def _lookup_namespace_uid(self, namespace_id: str): @@ -96,14 +96,14 @@ def close(self): self.pipeline.close() self.model.close() self.artifact.close() - self.app_service.close() + self.app.close() async def async_close(self): self.mgmt.async_close() self.pipeline.async_close() self.model.async_close() self.artifact.async_close() - self.app_service.async_close() + self.app.async_close() def get_mgmt(self) -> MgmtClient: return self.mgmt @@ -118,7 +118,7 @@ def get_model(self) -> ModelClient: return self.model def get_app(self) -> AppClient: - return self.app_service + return self.app def init_core_client(