Add friendly scrape names and a completeness check
This commit is contained in:
@@ -657,6 +657,17 @@ export class ScrapeStore {
|
||||
.run(preview.hash, preview.bytes, preview.ext ?? "webp", id);
|
||||
}
|
||||
|
||||
/** Message span of the walk, for completeness checks. */
|
||||
dbSummary(): { messages: number; oldest: string | null; newest: string | null } {
|
||||
const row = this.db
|
||||
.prepare(
|
||||
"SELECT COUNT(*) AS messages, MIN(timestamp) AS oldest, MAX(timestamp) AS newest FROM messages"
|
||||
)
|
||||
.get() as { messages: number; oldest: string | null; newest: string | null } | undefined;
|
||||
|
||||
return { messages: row?.messages ?? 0, oldest: row?.oldest ?? null, newest: row?.newest ?? null };
|
||||
}
|
||||
|
||||
/** Preview state for the whole scrape and per kind, for the backfill UI. */
|
||||
previewCounts(): {
|
||||
total: number;
|
||||
|
||||
Reference in New Issue
Block a user