Enha: new tables

This commit is contained in:
Grail Finder
2025-11-22 15:31:46 +03:00
parent 50d7bfced3
commit 4eb3d609a1
2 changed files with 54 additions and 38 deletions

View File

@@ -163,9 +163,9 @@ func (r *RAG) writeVectors(vectorCh chan []models.VectorRow) error {
for batch := range vectorCh {
for _, vector := range batch {
if err := r.storage.WriteVector(&vector); err != nil {
r.logger.Error("failed to write vector", "error", err, "slug", vector.Slug)
r.logger.Error("failed to write vector to DB", "error", err, "slug", vector.Slug)
LongJobStatusCh <- ErrRAGStatus
continue // a duplicate is not critical
return err // Stop the entire RAG operation on DB error
}
}
r.logger.Debug("wrote batch to db", "size", len(batch), "vector_chan_len", len(vectorCh))