@diosmosis I'm thinking there may be an issue around invalidation.
When executing eg
CoreAdminHomeApi::getInstance()->invalidateArchivedReports($idsite =1, 'today', 'day', false, false); then it generates 4 entries in the archive invalidations table:
When I then run the CLI archiver, it only processes the first archive for the day. All other ones are ignored in
usableArchiveExists because it found a usable archive for these periods.
This archive is invalidated though
and therefore it should reprocess the archive and not consider it as usable as such AFAIK.
In this case the invalidation was specifically requested and therefore it has to be reprocessed. FYI In my case in Matomo for WordPress I have these TTLs configured:
time_before_today_archive_considered_outdated = 1800 time_before_week_archive_considered_outdated = 3500 time_before_month_archive_considered_outdated = 7100 time_before_year_archive_considered_outdated = 14300 time_before_range_archive_considered_outdated = 3600
It is different when:
This I think works already.
I'm currently testing this, but I noticed
'today'/'yesterday'/'now' etc. aren't allowed in
CoreAdminHomeApi::getInstance()->invalidateArchivedReports() because of https://github.com/matomo-org/matomo/blob/4.x-dev/plugins/CoreAdminHome/API.php#L329. Just an FYI, will change in a PR.
👍 I'm using today's date string in https://github.com/matomo-org/wp-matomo/blob/1.3.1/classes/WpMatomo/Admin/SystemReport.php#L95-L100 was more like to clarify that I'm using today's date