fix: keep archive indexing off API startup
This commit is contained in:
+8
-4
@@ -843,10 +843,12 @@ async function adminRoutes(fastify) {
|
||||
}
|
||||
const counts = db.prepare(`
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM articles) AS total,
|
||||
(SELECT COUNT(*) FROM articles WHERE content IS NOT NULL AND content != '') AS withContent,
|
||||
COALESCE((SELECT seq FROM sqlite_sequence WHERE name='articles'), 0) AS total,
|
||||
(SELECT COUNT(*) FROM articles
|
||||
WHERE content IS NOT NULL AND content != ''
|
||||
AND is_index_page = 0 AND has_embedding = 1) AS withContent,
|
||||
(SELECT COUNT(*) FROM articles WHERE has_embedding = 1) AS withEmbedding,
|
||||
(SELECT COUNT(*) FROM events) AS eventCount
|
||||
COALESCE((SELECT seq FROM sqlite_sequence WHERE name='events'), 0) AS eventCount
|
||||
`).get();
|
||||
statsSummaryCache = { at: Date.now(), value: counts };
|
||||
return counts;
|
||||
@@ -863,7 +865,9 @@ async function adminRoutes(fastify) {
|
||||
const counts = db.prepare(`
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM articles) as total,
|
||||
(SELECT COUNT(*) FROM articles WHERE content IS NOT NULL AND content != '') as withContent,
|
||||
(SELECT COUNT(*) FROM articles
|
||||
WHERE content IS NOT NULL AND content != ''
|
||||
AND is_index_page = 0 AND has_embedding = 1) as withContent,
|
||||
(SELECT COUNT(*) FROM articles WHERE has_embedding = 1) as withEmbedding,
|
||||
(SELECT COUNT(*) FROM events) as eventCount,
|
||||
(SELECT COUNT(*) FROM articles WHERE ingested_at >= datetime('now', '-1 hour')) as ingestedPerHour,
|
||||
|
||||
Reference in New Issue
Block a user