diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-06-19 04:50:47 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-06-19 04:50:47 +0400 |
commit | a8aed8d2cc207c2dcfedf01442b2d35c99fd8cea (patch) | |
tree | 87d412b93767f388cbc7ce6d82142c38af98f6ba /core/ArchiveProcessor.php | |
parent | 8575c02aa74577c3674c367dc32c87f0865df00d (diff) |
There is now a new error in PrivacyManagerTest, making some progress...
Diffstat (limited to 'core/ArchiveProcessor.php')
-rw-r--r-- | core/ArchiveProcessor.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php index 714c4e821b..b25326d68f 100644 --- a/core/ArchiveProcessor.php +++ b/core/ArchiveProcessor.php @@ -279,13 +279,18 @@ abstract class Piwik_ArchiveProcessor } $this->logStatusDebug($requestedPlugin); - if ($this->getNumberOfVisits() > 0 - && !$enforceProcessCoreMetricsOnly - ) { + $isVisitsToday = $this->getNumberOfVisits() > 0; + if ($isVisitsToday + && !$enforceProcessCoreMetricsOnly) { $this->compute(); } $archiveWriter->finalizeArchive(); + + if ($isVisitsToday && $this->period->getLabel() != 'day') { + Piwik_DataAccess_ArchiveSelector::purgeOutdatedArchives($this->getPeriod()->getDateStart()); + } + return $archiveWriter->getIdArchive(); } |