diff options
author | diosmosis <benaka@piwik.pro> | 2015-05-13 14:26:48 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-11 09:42:05 +0300 |
commit | b187a823c1ea6cb0a6e0c0dc5c82eaadbff3120e (patch) | |
tree | 6553321a53255fef5dba4383745c8e8a3e6a5379 /plugins/PrivacyManager | |
parent | 22f5777323533c54994646d077139c3a5251be3b (diff) |
Fill out some docs for LogDataPurger in PrivacyManager, add log iteration step size to constructor so it can potentially be conifgured via DI, remove some unneeded TODOs.
Diffstat (limited to 'plugins/PrivacyManager')
-rwxr-xr-x | plugins/PrivacyManager/LogDataPurger.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/PrivacyManager/LogDataPurger.php b/plugins/PrivacyManager/LogDataPurger.php index 738964e885..5925536d0b 100755 --- a/plugins/PrivacyManager/LogDataPurger.php +++ b/plugins/PrivacyManager/LogDataPurger.php @@ -15,7 +15,6 @@ use Piwik\Date; use Piwik\Db; use Piwik\Log; use Piwik\LogDeleter; -use Piwik\Piwik; /** * Purges the log_visit, log_conversion and related tables of old visit data. @@ -28,14 +27,14 @@ class LogDataPurger public static $selectSegmentSize = 100000; /** - * TODO + * LogDeleter service used to delete visits. * * @var LogDeleter */ - private $logPurger; + private $logDeleter; /** - * TODO + * DAO class that is used to delete unused actions. * * @var RawLogDao */ @@ -64,7 +63,7 @@ class LogDataPurger */ public function purgeData($deleteLogsOlderThan) { - $dateUpperLimit = Date::factory("today")->subDay($deleteLogsOlderThan); // TODO: move logic to constructor + $dateUpperLimit = Date::factory("today")->subDay($deleteLogsOlderThan); $this->logPurger->deleteVisitsFor($start = null, $dateUpperLimit->getDatetime()); $logTables = self::getDeleteTableLogTables(); @@ -77,7 +76,7 @@ class LogDataPurger Log::warning($logMessage); } - // optimize table overhead after deletion // TODO: logs:delete command should allow table optimization + // optimize table overhead after deletion Db::optimizeTables($logTables); } |