diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-12-22 01:13:16 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-12-22 01:13:16 +0300 |
commit | fb91155043c2dd269f32e27962e3cbdb00ad0aad (patch) | |
tree | e91cfecd1611dd7c10a5248d60140d6503d994e9 /misc | |
parent | 6130e7e86baff2979bb84bf979a13130124c1202 (diff) |
When importing visits on a day different from the visits day, invalidate the archived reports
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/log-analytics/import_logs.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index 315b2ac1a1..3714420363 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -1443,26 +1443,6 @@ class Recorder(object): return response['message'] - @staticmethod - def invalidate_reports(): - if config.options.dry_run or not stats.dates_recorded: - return - - if config.options.invalidate_dates is not None: - dates = [date for date in config.options.invalidate_dates.split(',') if date] - else: - dates = [date.strftime('%Y-%m-%d') for date in stats.dates_recorded] - if dates: - print '\nPurging Piwik archives for dates: ' + ' '.join(dates) - result = piwik.call_api( - 'CoreAdminHome.invalidateArchivedReports', - dates=','.join(dates), - idSites=','.join(str(site_id) for site_id in stats.piwik_sites), - ) - print('\nTo re-process these reports with your newly imported data, execute the following command: \n' - '$ /path/to/piwik/console core:archive --url=http://example/piwik --force-all-websites --force-all-periods=315576000 --force-date-last-n=1000' - '\nReference: http://piwik.org/docs/setup-auto-archiving/ ') - class Hit(object): """ It's a simple container. @@ -1899,10 +1879,6 @@ def main(): if config.options.show_progress: stats.stop_monitor() - try: - Recorder.invalidate_reports() - except Piwik.Error, e: - pass stats.print_summary() def fatal_error(error, filename=None, lineno=None): |