From 2704dd02cf0bcdc3ee87ce5aa13c19f50c8d423d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=AA=E5=8A=9B=E5=A5=8B=E6=96=97=E7=9A=84=E9=98=BF?= =?UTF-8?q?=E4=B8=89?= <59323683+zh19990906@users.noreply.github.com> Date: Wed, 26 Jun 2024 20:11:52 +0800 Subject: [PATCH] Update milvus_client.py Query multiple partition statuses --- pymilvus/milvus_client/milvus_client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pymilvus/milvus_client/milvus_client.py b/pymilvus/milvus_client/milvus_client.py index 072044efd..3913435ae 100644 --- a/pymilvus/milvus_client/milvus_client.py +++ b/pymilvus/milvus_client/milvus_client.py @@ -708,14 +708,16 @@ def release_collection(self, collection_name: str, timeout: Optional[float] = No def get_load_state( self, collection_name: str, - partition_name: Optional[str] = "", + partition_names: Optional[Union[str, List[str]]] = "", timeout: Optional[float] = None, **kwargs, ) -> Dict: conn = self._get_connection() - partition_names = None - if partition_name: - partition_names = [partition_name] + if partition_names: + if isinstance(partition_names, str): + partition_names = [partition_names] + else: + partition_names = None try: state = conn.get_load_state(collection_name, partition_names, timeout=timeout, **kwargs) except Exception as ex: