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:
authormattab <matthieu.aubry@gmail.com>2014-11-05 08:55:07 +0300
committermattab <matthieu.aubry@gmail.com>2014-11-05 08:55:07 +0300
commit07dabe2400626c6855dcf5b3d4f390125f0b6e30 (patch)
tree8d4f6f849580a92ae8171f6f50e5ec3b22a88539 /core/CronArchive.php
parent8c4ab6d1ef5a683f749d97dcaa26a6e2ce65df12 (diff)
fixes #6598 Add sites to be invalidated when the archiving failed to make sure we try to reprocess again later
Diffstat (limited to 'core/CronArchive.php')
-rw-r--r--core/CronArchive.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php
index 64fee8ba05..5cf42664a4 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -604,8 +604,8 @@ class CronArchive
// Remove this website from the list of websites to be invalidated
// since it's now just about to being re-processed, makes sure another running cron archiving process
// does not archive the same idSite
- if ($this->isOldReportInvalidatedForWebsite($idSite)) {
-
+ $websiteInvalidatedShouldReprocess = $this->isOldReportInvalidatedForWebsite($idSite);
+ if ($websiteInvalidatedShouldReprocess) {
$store = new InvalidatedReports();
$store->storeSiteIsReprocessed($idSite);
}
@@ -613,7 +613,7 @@ class CronArchive
// when some data was purged from this website
// we make sure we query all previous days/weeks/months
$processDaysSince = $lastTimestampWebsiteProcessedDay;
- if ($this->isOldReportInvalidatedForWebsite($idSite)
+ if ($websiteInvalidatedShouldReprocess
// when --force-all-websites option,
// also forces to archive last52 days to be safe
|| $this->shouldArchiveAllSites) {
@@ -632,6 +632,12 @@ class CronArchive
// cancel the succesful run flag
Option::set($this->lastRunKey($idSite, "day"), 0);
+ // cancel marking the site as reprocessed
+ if($websiteInvalidatedShouldReprocess) {
+ $store = new InvalidatedReports();
+ $store->addInvalidatedSitesToReprocess(array($idSite));
+ }
+
$this->logError("Empty or invalid response '$content' for website id $idSite, " . $timerWebsite->__toString() . ", skipping");
$this->skipped++;
return false;