Skip to content

Commit

Permalink
purger: log revid as well
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Jan 7, 2024
1 parent e604573 commit 5b1ef0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eventstream-router/routes/purger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 5b1ef0c

Please sign in to comment.