@mattab opened this Issue on August 17th 2017 Owner

Currently there is this config setting time_before_today_archive_considered_outdated which allows to change the timeout after which a report for "Today/This week/This month/This year" will be re-processed.

It reads:

; Time in seconds after which an archive will be computed again. This setting is used only for today's statistics.
; This setting is overriden in the UI, under "General Settings".
; This setting is only used if it hasn't been overriden via the UI yet, or if enable_general_settings_admin=0
time_before_today_archive_considered_outdated = 150

It would be valuable to offer this setting for each period separately, so that for example we can say:

  • Process today's reports at most every hour
  • Process this week's reports at most every 2 hours
  • Process this month's reports at most 9 hours
  • Process this year's reports at most 18 hours

eg. time_before_this_week_archive_considered_outdated etc.

@tsteur commented on August 23rd 2017 Owner

FYI: Moving to 3.2.0 for now.

I had a look at this and from what I understand it would be needed to add run keys for each individual period like in https://github.com/piwik/piwik/blob/3.0.5-b2/core/CronArchive.php#L1535-L1539 to know when which period has run the last time.

Or would it be fine to only adjust this in https://github.com/piwik/piwik/blob/3.0.5-b2/core/ArchiveProcessor/Rules.php#L119 (getMinTimeProcessedForTemporaryArchive) and even though the cron archive might try to archive a period, it won't since it will find a recent enough archive?

@mattab commented on September 4th 2017 Owner

fixed in #11979

This Issue was closed on September 4th 2017
Powered by GitHub Issue Mirror