Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions gitnexus/src/server/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,16 @@ export const createServer = async (port: number, host: string = '127.0.0.1') =>
undefined, // context
existingEmbeddings,
);

// Flush WAL so subsequent /api/search requests see the new
// embeddings immediately (#1149). In the CLI path closeLbug()
// handles this during process exit, but the server keeps the
// connection open for other routes -- a CHECKPOINT is enough.
try {
await executeQuery('CHECKPOINT');
} catch {
/* best-effort -- older LadybugDB may not support it */
}
});

clearTimeout(embedTimeout);
Expand Down
Loading