Skip to content

Commit

Permalink
db-tabulator: add +10 mins in getQueriesToRun()
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Jan 11, 2024
1 parent eedabc8 commit 6530448
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db-tabulator/MariadbMetadataStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export class MariadbMetadataStore implements MetadataStore {
const data = await this.db.query(`
SELECT page, idx FROM dbreports
WHERE intervalDays IS NOT NULL
AND (lastUpdate IS NULL OR lastUpdate < NOW() - INTERVAL intervalDays DAY)
`);
AND (lastUpdate IS NULL OR lastUpdate < NOW() - INTERVAL intervalDays DAY + INTERVAL 10 MINUTE)
`); // +10 mins helps get the reports update around the same time every day
let pages: Record<string, Set<number>> = {};
data.forEach(row => {
if (!pages[row.page]) {
Expand Down

0 comments on commit 6530448

Please sign in to comment.