From 5b1ef0cebb1409542311862aa35133db2becfc03 Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Mon, 8 Jan 2024 00:40:10 +0530 Subject: [PATCH] purger: log revid as well --- eventstream-router/routes/purger.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eventstream-router/routes/purger.ts b/eventstream-router/routes/purger.ts index 6232fdf..bcd7f8e 100644 --- a/eventstream-router/routes/purger.ts +++ b/eventstream-router/routes/purger.ts @@ -94,11 +94,12 @@ export default class Purger extends Route { } async parseEntries() { - const text = (await bot.read(this.CONF_PAGE)).revisions[0].content; + const rev = (await bot.read(this.CONF_PAGE, { rvprop: ['content', 'timestamp', 'ids'] })).revisions[0]; + const text = rev.content; const entries = bot.Wikitext.parseTemplates(text, { namePredicate: name => name === '/Entry' }); - this.log(`[V] Parsed ${entries.length} titles from ${this.CONF_PAGE}`); + this.log(`[V] Parsed ${entries.length} titles from ${this.CONF_PAGE} (revid ${rev.revid})`); const existingEntries = Object.fromEntries( [...this.scheduledPurges.keys()].map(e => [e.serialize(), e])