diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-05-13 04:07:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 04:07:05 +0300 |
commit | 9b13d90251203fcfefa4493ae97ca86d47d7b173 (patch) | |
tree | 5f75a6d2b721bd282b1e7284d0ba7bd95951981d | |
parent | c870770157a3e9c893308967dc274c8feac5d4be (diff) |
Fix getArchiveIdAndVisits() call (#15946)
-rw-r--r-- | core/CronArchive.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php index e686a6c7a8..1d80f6c06e 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -967,10 +967,10 @@ class CronArchive $today = Date::factoryInTimezone('today', $timezone); $isPeriodIncludesToday = $params->getPeriod()->isDateInPeriod($today); - $minArchiveProcessedTtl = $isPeriodIncludesToday ? Rules::getPeriodArchiveTimeToLiveDefault($params->getPeriod()->getLabel()) : null; + $minArchiveProcessedTime = $isPeriodIncludesToday ? Date::now()->subSeconds(Rules::getPeriodArchiveTimeToLiveDefault($params->getPeriod()->getLabel())) : null; // empty plugins param since we only check for an 'all' archive - list($idArchive, $visits, $visitsConverted, $ignore, $tsArchived) = ArchiveSelector::getArchiveIdAndVisits($params, $minArchiveProcessedTtl, $includeInvalidated = false); + list($idArchive, $visits, $visitsConverted, $ignore, $tsArchived) = ArchiveSelector::getArchiveIdAndVisits($params, $minArchiveProcessedTime, $includeInvalidated = false); // day has changed since the archive was created, we need to reprocess it if ($isYesterday |