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:
authordizzy <diosmosis@users.noreply.github.com>2021-05-11 04:20:39 +0300
committerGitHub <noreply@github.com>2021-05-11 04:20:39 +0300
commitebd79e69ead213bc6ae1a5ebf956a2ccc4237aa5 (patch)
tree02d1a5ac9dc5ff023d8d7ac8f0cc9bfe26783f67 /plugins/CoreAdminHome
parente812566b105a153fb632eb3097bb115513d7d264 (diff)
Add option to skip log purging check when invalidating archives in the rare cases it is needed. (#17538)
Diffstat (limited to 'plugins/CoreAdminHome')
-rw-r--r--plugins/CoreAdminHome/Commands/InvalidateReportData.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CoreAdminHome/Commands/InvalidateReportData.php b/plugins/CoreAdminHome/Commands/InvalidateReportData.php
index 3e112c8c8c..551bc03894 100644
--- a/plugins/CoreAdminHome/Commands/InvalidateReportData.php
+++ b/plugins/CoreAdminHome/Commands/InvalidateReportData.php
@@ -62,6 +62,10 @@ class InvalidateReportData extends ConsoleCommand
$this->addOption('dry-run', null, InputOption::VALUE_NONE, 'For tests. Runs the command w/o actually '
. 'invalidating anything.');
$this->addOption('plugin', null, InputOption::VALUE_REQUIRED, 'To invalidate data for a specific plugin only.');
+ $this->addOption('ignore-log-deletion-limit', null, InputOption::VALUE_NONE,
+ 'Ignore the log purging limit when invalidating archives. If a date is older than the log purging threshold (which means '
+ . 'there should be no log data for it), we normally skip invalidating it in order to prevent losing any report data. In some cases, '
+ . 'however it is useful, if, for example, your site was imported from Google, and there is never any log data.');
$this->setHelp('Invalidate archived report data by date range, site and period. Invalidated archive data will '
. 'be re-archived during the next core:archive run. If your log data has changed for some reason, this '
. 'command can be used to make sure reports are generated using the new, changed log data.');
@@ -74,6 +78,7 @@ class InvalidateReportData extends ConsoleCommand
$cascade = $input->getOption('cascade');
$dryRun = $input->getOption('dry-run');
$plugin = $input->getOption('plugin');
+ $ignoreLogDeletionLimit = $input->getOption('ignore-log-deletion-limit');
$sites = $this->getSitesToInvalidateFor($input);
$periodTypes = $this->getPeriodTypesToInvalidateFor($input);
@@ -102,7 +107,7 @@ class InvalidateReportData extends ConsoleCommand
$output->writeln($message);
} else {
$invalidationResult = $invalidator->markArchivesAsInvalidated($sites, $dates, $periodType, $segment, $cascade,
- false, $plugin);
+ false, $plugin, $ignoreLogDeletionLimit);
if ($output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) {
$output->writeln($invalidationResult->makeOutputLogs());