Skip to content
Extraits de code Groupes Projets
Valider 6ab57de0 rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

Fix custom date ranges are still being archived when --force-periods=day

parent 96ae06bd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -612,13 +612,16 @@ class CronArchive ...@@ -612,13 +612,16 @@ class CronArchive
$success = $periodArchiveWasSuccessful && $success; $success = $periodArchiveWasSuccessful && $success;
} }
// period=range if ($this->shouldProcessPeriod('range')) {
$customDateRangesToPreProcessForSite = $this->getCustomDateRangeToPreProcess($idSite); // period=range
foreach ($customDateRangesToPreProcessForSite as $dateRange) { $customDateRangesToPreProcessForSite = $this->getCustomDateRangeToPreProcess($idSite);
$archiveSegments = false; // do not pre-process segments for period=range #7611 foreach ($customDateRangesToPreProcessForSite as $dateRange) {
$periodArchiveWasSuccessful = $this->archiveReportsFor($idSite, 'range', $dateRange, $archiveSegments); $archiveSegments = false; // do not pre-process segments for period=range #7611
$success = $periodArchiveWasSuccessful && $success; $periodArchiveWasSuccessful = $this->archiveReportsFor($idSite, 'range', $dateRange, $archiveSegments);
$success = $periodArchiveWasSuccessful && $success;
}
} }
return $success; return $success;
} }
...@@ -1285,7 +1288,7 @@ class CronArchive ...@@ -1285,7 +1288,7 @@ class CronArchive
*/ */
private function getDefaultPeriodsToProcess() private function getDefaultPeriodsToProcess()
{ {
return array('day', 'week', 'month', 'year'); return array('day', 'week', 'month', 'year', 'range');
} }
/** /**
......
...@@ -100,7 +100,7 @@ class CoreArchiver extends ConsoleCommand ...@@ -100,7 +100,7 @@ class CoreArchiver extends ConsoleCommand
$command->addOption('force-idsites', null, InputOption::VALUE_OPTIONAL, $command->addOption('force-idsites', null, InputOption::VALUE_OPTIONAL,
'If specified, archiving will be processed only for these Sites Ids (comma separated)'); 'If specified, archiving will be processed only for these Sites Ids (comma separated)');
$command->addOption('force-periods', null, InputOption::VALUE_OPTIONAL, $command->addOption('force-periods', null, InputOption::VALUE_OPTIONAL,
"If specified, archiving will be processed only for these Periods (comma separated eg. day,week,month)"); "If specified, archiving will be processed only for these Periods (comma separated eg. day,week,month,year,range)");
$command->addOption('force-date-last-n', null, InputOption::VALUE_REQUIRED, $command->addOption('force-date-last-n', null, InputOption::VALUE_REQUIRED,
"This script calls the API with period=lastN. You can force the N in lastN by specifying this value."); "This script calls the API with period=lastN. You can force the N in lastN by specifying this value.");
$command->addOption('force-date-range', null, InputOption::VALUE_OPTIONAL, $command->addOption('force-date-range', null, InputOption::VALUE_OPTIONAL,
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter