Commit 7a27642 1 parent ad166af commit 7a27642 Copy full SHA for 7a27642
File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,14 @@ def on(self):
41
41
42
42
"""
43
43
try :
44
- self .connection = connections .connect (host = self .config ['MILVUS_URI' ], port = self .config ['MILVUS_PORT' ])
44
+ self .connection = connections .connect (
45
+ host = self .config ['MILVUS_URI' ]
46
+ , port = self .config ['MILVUS_PORT' ]
47
+ , user = self .config ['MILVUS_USER' ]
48
+ , password = self .config ['MILVUS_PASSWORD' ]
49
+ ) \
50
+ if 'MILVUS_PASSWORD' in self .config and 'MILVUS_USER' in self .config \
51
+ else connections .connect (host = self .config ['MILVUS_URI' ], port = self .config ['MILVUS_PORT' ])
45
52
self .collection = Collection (name = self .config ['INDEX' ], schema = self .schema )
46
53
_f ('success' , f"connected successfully to { self .config ['MILVUS_URI' ]} " )
47
54
except Exception as e :
You can’t perform that action at this time.
0 commit comments