retry embeddings fetch (#245)

This commit is contained in:
Adil Hafeez 2024-11-05 12:04:36 -06:00 committed by GitHub
parent 9a5c5cc3a3
commit 9a6ae2efee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 79 additions and 41 deletions

View file

@ -35,10 +35,10 @@ impl HttpContext for StreamContext {
let request_path = self.get_http_request_header(":path").unwrap_or_default();
if request_path == HEALTHZ_PATH {
if self.embeddings_store.is_none() {
self.send_http_response(503, vec![], None);
} else {
if self.is_embedding_store_initialized() {
self.send_http_response(200, vec![], None);
} else {
self.send_http_response(503, vec![], None);
}
return Action::Continue;
}