File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,18 @@ async def lifespan(app: FastAPI):
92
92
logger .info ("🔍 Initializing FAISS search service..." )
93
93
await faiss_service .initialize ()
94
94
95
+ logger .info ("📊 Updating FAISS index with all registered services..." )
96
+ all_servers = server_service .get_all_servers ()
97
+ for service_path , server_info in all_servers .items ():
98
+ is_enabled = server_service .is_service_enabled (service_path )
99
+ try :
100
+ await faiss_service .add_or_update_service (service_path , server_info , is_enabled )
101
+ logger .debug (f"Updated FAISS index for service: { service_path } " )
102
+ except Exception as e :
103
+ logger .error (f"Failed to update FAISS index for service { service_path } : { e } " , exc_info = True )
104
+
105
+ logger .info (f"✅ FAISS index updated with { len (all_servers )} services" )
106
+
95
107
logger .info ("🏥 Initializing health monitoring service..." )
96
108
await health_service .initialize ()
97
109
You can’t perform that action at this time.
0 commit comments