diff --git a/milvus_client.py b/milvus_client.py index 223c6c1..301f91a 100644 --- a/milvus_client.py +++ b/milvus_client.py @@ -88,3 +88,10 @@ class MilvusClient(PyOperator): @property def shared_type(self): return SharedType.Shareable + + def __del__(self): + if connections.has_connection(self._connect_name): + try: + connections.disconnect(self._connect_name) + except: + pass