taspol commited on
Commit
c6f0ab2
·
1 Parent(s): 4564d70

feat: increase time out search similar

Browse files
Files changed (1) hide show
  1. data_importer.py +2 -2
data_importer.py CHANGED
@@ -21,7 +21,7 @@ class DataImporter:
21
  def _init_qdrant(self):
22
  """Initialize Qdrant client with error handling"""
23
  try:
24
- self.client = RestQdrantClient(url=self.qdrant_url)
25
  # Test connection
26
  self.client.get_collections()
27
  self.qdrant_available = True
@@ -127,4 +127,4 @@ class DataImporter:
127
  ]
128
  except Exception as e:
129
  print(f"Error searching: {e}")
130
- return [] # Always return empty list, never a dict with error
 
21
  def _init_qdrant(self):
22
  """Initialize Qdrant client with error handling"""
23
  try:
24
+ self.client = RestQdrantClient(url=self.qdrant_url,timeout=15)
25
  # Test connection
26
  self.client.get_collections()
27
  self.qdrant_available = True
 
127
  ]
128
  except Exception as e:
129
  print(f"Error searching: {e}")
130
+ raise ValueError(f"Search failed: {str(e)}")