diff options
author | Benaka <diosmosis@users.noreply.github.com> | 2015-06-25 15:39:40 +0300 |
---|---|---|
committer | Benaka <diosmosis@users.noreply.github.com> | 2015-06-25 15:39:40 +0300 |
commit | e1de52b4ae1870ec7fa23c1a9e9eae2bbf386aa6 (patch) | |
tree | a28693bb3bcfe18e6d128d923373bdbcfe2b3083 | |
parent | ea8935df529b6c733446e2c0afafb93edbd0139c (diff) | |
parent | d45a4bf92a80582a11339d0cb39e5fb3870f3460 (diff) |
Merge pull request #8214 from piwik/cron_archive_output_tweak
Add date to CronArchive output when printing info about preprocessing what will be archived for.
-rw-r--r-- | core/CronArchive.php | 11 | ||||
-rw-r--r-- | tests/PHPUnit/Integration/CronArchiveTest.php | 8 |
2 files changed, 10 insertions, 9 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php index 6375b232db..5c6d9fe7b2 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -672,7 +672,7 @@ class CronArchive $date = $this->getApiDateParameter($idSite, "day", $processDaysSince); $url = $this->getVisitsRequestUrl($idSite, "day", $date); - $this->logArchiveWebsite($idSite, "day"); + $this->logArchiveWebsite($idSite, "day", $date); $content = $this->request($url); $daysResponse = @unserialize($content); @@ -763,7 +763,7 @@ class CronArchive // already processed above for "day" if ($period != "day") { $urls[] = $url; - $this->logArchiveWebsite($idSite, $period); + $this->logArchiveWebsite($idSite, $period, $date); } $segmentRequestsCount = 0; @@ -1507,12 +1507,13 @@ class CronArchive * @param $idSite * @param $period */ - private function logArchiveWebsite($idSite, $period) + private function logArchiveWebsite($idSite, $period, $date) { $this->logger->info(sprintf( - "Will pre-process for website id = %s, %s period", + "Will pre-process for website id = %s, period = %s, date = %s", $idSite, - $period + $period, + $date )); $this->logger->info('- pre-processing all visits'); } diff --git a/tests/PHPUnit/Integration/CronArchiveTest.php b/tests/PHPUnit/Integration/CronArchiveTest.php index 888ebb292a..394b70f046 100644 --- a/tests/PHPUnit/Integration/CronArchiveTest.php +++ b/tests/PHPUnit/Integration/CronArchiveTest.php @@ -101,22 +101,22 @@ NOTES --------------------------- START Starting Piwik reports archiving... -Will pre-process for website id = 1, day period +Will pre-process for website id = 1, period = day, date = last52 - pre-processing all visits - skipping segment archiving for 'actions>=4'. - pre-processing segment 1/1 actions>=2 Archived website id = 1, period = day, 1 segments, 0 visits in last %s days, 0 visits today, Time elapsed: %s -Will pre-process for website id = 1, week period +Will pre-process for website id = 1, period = week, date = last198 - pre-processing all visits - skipping segment archiving for 'actions>=4'. - pre-processing segment 1/1 actions>=2 Archived website id = 1, period = week, 1 segments, 1 visits in last %s weeks, 1 visits this week, Time elapsed: %s -Will pre-process for website id = 1, month period +Will pre-process for website id = 1, period = month, date = last52 - pre-processing all visits - skipping segment archiving for 'actions>=4'. - pre-processing segment 1/1 actions>=2 Archived website id = 1, period = month, 1 segments, 1 visits in last %s months, 1 visits this month, Time elapsed: %s -Will pre-process for website id = 1, year period +Will pre-process for website id = 1, period = year, date = last7 - pre-processing all visits - skipping segment archiving for 'actions>=4'. - pre-processing segment 1/1 actions>=2 |