feat(ingest): summarise new commits after metrics
This commit is contained in:
parent
bf7d024cef
commit
6890a6d29e
1 changed files with 10 additions and 0 deletions
|
|
@ -178,6 +178,16 @@ export async function ingestProject(
|
|||
const { recomputeMetrics } = await import("@/lib/metrics/store");
|
||||
await recomputeMetrics(project.id);
|
||||
|
||||
// Summaries are an enhancement, not part of ingestion. Commits are already
|
||||
// stored and the metrics are already correct by this point, so a provider
|
||||
// outage here must not fail the webhook or lose a push.
|
||||
try {
|
||||
const { summariseProject } = await import("@/lib/ai/summarise");
|
||||
await summariseProject(project.id);
|
||||
} catch (error) {
|
||||
console.error(`[ingest] summarisation failed for ${project.id}`, error);
|
||||
}
|
||||
|
||||
return { created, skipped, pagesRead: page };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue