From 4e9a0c569effa3bf719d81792b44f0ac253c588a Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 27 Feb 2023 23:03:39 -0500 Subject: [PATCH] Only update boteditcount report daily, not hourly Because it's a different format report, it'll fail to find the timestamp and therefore try updating every hour regardless. --- dbreps2/src/enwiki/boteditcount.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbreps2/src/enwiki/boteditcount.rs b/dbreps2/src/enwiki/boteditcount.rs index d64e1664..c546e250 100644 --- a/dbreps2/src/enwiki/boteditcount.rs +++ b/dbreps2/src/enwiki/boteditcount.rs @@ -193,6 +193,10 @@ impl Report for BotEditCount { "|-\n|}\n".to_string() } + fn needs_update(&self, _old_text: &str) -> Result { + Ok(time::OffsetDateTime::now_utc().hour() == 4) + } + async fn post_run(&self, bot: &Bot, debug_mode: bool) -> Result<()> { info!("Updating Wikipedia:List of bots by number of edits/Age");