File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,14 +185,6 @@ pub trait Report<T: Send + Sync> {
185185 }
186186
187187 fn needs_update ( & self , old_text : & str ) -> Result < bool > {
188- if let Some ( hour) = self . frequency ( ) . at_hour ( ) {
189- // If we are supposed to run at a specific time
190- // and it is that time, then run!
191- if OffsetDateTime :: now_utc ( ) . hour ( ) == hour {
192- return Ok ( true ) ;
193- }
194- }
195-
196188 // Pages with {{database report}} are maintained by SDZeroBot and contain the SQL queries
197189 // directly. Skip updating the report if it has been migrated to use that template.
198190 if contains_database_report_template ( old_text) {
@@ -202,6 +194,15 @@ pub trait Report<T: Send + Sync> {
202194 ) ;
203195 return Ok ( false ) ;
204196 }
197+
198+ if let Some ( hour) = self . frequency ( ) . at_hour ( ) {
199+ // If we are supposed to run at a specific time
200+ // and it is that time, then run!
201+ if OffsetDateTime :: now_utc ( ) . hour ( ) == hour {
202+ return Ok ( true ) ;
203+ }
204+ }
205+
205206 let re = Regex :: new ( "<onlyinclude>(.*?)</onlyinclude>" ) . unwrap ( ) ;
206207 let ts = match re. captures ( old_text) {
207208 Some ( cap) => cap[ 1 ] . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments