diff options
author | diosmosis <benaka@piwik.pro> | 2015-05-06 06:47:25 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-11 09:42:03 +0300 |
commit | 58c7f32f42c155226496b3e8bfc83f7639144a0f (patch) | |
tree | ed230d8296f32eb0b008f32edeb31d0aa371a5e5 /plugins/UserCountry | |
parent | 0ae985fb525fe0fb6cd2e72751420c1c5afbfe76 (diff) |
Quick POC change to usercountry:attribute to use non-existant log iterator, and add options to delete:logs command.
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r-- | plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php b/plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php index 42b3750dcd..f8e16cbe7b 100644 --- a/plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php +++ b/plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php @@ -115,6 +115,12 @@ class AttributeHistoricalDataWithLocations extends ConsoleCommand protected function processSpecifiedLogsInChunks(OutputInterface $output, $from, $to, $segmentLimit) { + // TODO: maybe should rename it, it's not really an iterator but a range at this point. LogRowRange? LazyLogRowRange? + $rawLogIterator = $this->dao->makeLogIterator(array('dateStart' => $from, 'dateEnd' => $to), $segmentLimit); // TODO [ should contain delete by params ] + foreach ($rawLogIterator->getChunks() as $chunk) { + $this->reattributeVisitLogs($output, $chunk->getRows()); + } + /* $visitFieldsToSelect = array_merge(array('idvisit', 'location_ip'), array_keys(VisitorGeolocator::$logVisitFieldsToUpdate)); $lastId = 0; @@ -126,6 +132,7 @@ class AttributeHistoricalDataWithLocations extends ConsoleCommand $this->reattributeVisitLogs($output, $logs); } } while (count($logs) == $segmentLimit); + */ } protected function reattributeVisitLogs(OutputInterface $output, $logRows) |