Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-03-04 03:39:48 +0300
committerdiosmosis <benaka@piwik.pro>2015-03-04 03:39:48 +0300
commitb78eee41f23961c5ba81fbad19f7d885348711f7 (patch)
treee24dfccd839e9e5c9f7d1ba910fa6bd580e8607e
parentb60b66faf588d2eac10ff79fb7ca5011e299c52d (diff)
Refs #7181, remove 'purging every N hours' check in archive purger logic since it appears unnecessary. Removing for 2.11.2 release.
-rw-r--r--core/ArchiveProcessor/Rules.php21
1 files changed, 3 insertions, 18 deletions
diff --git a/core/ArchiveProcessor/Rules.php b/core/ArchiveProcessor/Rules.php
index a715623ca6..06b38aa27d 100644
--- a/core/ArchiveProcessor/Rules.php
+++ b/core/ArchiveProcessor/Rules.php
@@ -124,30 +124,15 @@ class Rules
*/
public static function shouldPurgeOutdatedArchives(Date $date)
{
- if (! self::isRequestAuthorizedToArchive()){
- Log::info("Purging temporary archives: skipped (no authorization)");
- return false;
- }
-
- $key = self::FLAG_TABLE_PURGED . "blob_" . $date->toString('Y_m');
- $timestamp = Option::get($key);
-
- // we shall purge temporary archives after their timeout is finished, plus an extra 6 hours
- // in case archiving is disabled or run once a day, we give it this extra time to run
- // and re-process more recent records...
- $temporaryArchivingTimeout = self::getTodayArchiveTimeToLive();
- $hoursBetweenPurge = 6;
- $purgeEveryNSeconds = max($temporaryArchivingTimeout, $hoursBetweenPurge * 3600);
-
// we only delete archives if we are able to process them, otherwise, the browser might process reports
// when &segment= is specified (or custom date range) and would below, delete temporary archives that the
// browser is not able to process until next cron run (which could be more than 1 hour away)
- if ($timestamp !== false && $timestamp >= time() - $purgeEveryNSeconds) {
- Log::info("Purging temporary archives: skipped (purging every " . $hoursBetweenPurge . "hours)");
+ if (! self::isRequestAuthorizedToArchive()){
+ Log::info("Purging temporary archives: skipped (no authorization)");
return false;
}
- Option::set($key, time());
+ $temporaryArchivingTimeout = self::getTodayArchiveTimeToLive();
if (self::isBrowserTriggerEnabled()) {
// If Browser Archiving is enabled, it is likely there are many more temporary archives