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:
authorMatthieu Aubry <matt@piwik.org>2015-07-24 12:18:45 +0300
committerMatthieu Aubry <matt@piwik.org>2015-07-24 12:18:45 +0300
commit6ed4c5784a6848cc26df81521b9ab9c2795c47ec (patch)
tree85fee05c3be6dba42cfda86e42993729633d6b22 /plugins
parent4da18b62ed54c9a5e43da4e2c4f7c9bce77d31ee (diff)
parent3d51a340039d8aba93423dcfd3cc6d122ea3f2ab (diff)
Merge pull request #8418 from piwik/8316_core_archive_url
Fixes #8316, re-add core:archive URL override functionality for usersthat do not use systems that support CLI archiving.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreConsole/Commands/CoreArchiver.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/CoreConsole/Commands/CoreArchiver.php b/plugins/CoreConsole/Commands/CoreArchiver.php
index cfe7905d3d..40fc7d4c71 100644
--- a/plugins/CoreConsole/Commands/CoreArchiver.php
+++ b/plugins/CoreConsole/Commands/CoreArchiver.php
@@ -23,12 +23,12 @@ class CoreArchiver extends ConsoleCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
- $archiver = self::makeArchiver("", $input);
+ $archiver = self::makeArchiver($input->getOption('url'), $input);
$archiver->main();
}
// also used by another console command
- public static function makeArchiver($url, InputInterface $input) // TODO: remove url from this function
+ public static function makeArchiver($url, InputInterface $input)
{
$archiver = new CronArchive();
@@ -56,6 +56,8 @@ class CoreArchiver extends ConsoleCommand
$segmentIds = array_map('trim', $segmentIds);
$archiver->setSegmentsToForceFromSegmentIds($segmentIds);
+ $archiver->setUrlToPiwik($url);
+
return $archiver;
}
@@ -75,7 +77,10 @@ class CoreArchiver extends ConsoleCommand
but it is recommended to run it via command line/CLI instead.
* If you have any suggestion about this script, please let the team know at feedback@piwik.org
* Enjoy!");
- $command->addOption('url', null, InputOption::VALUE_REQUIRED, "Deprecated.");
+ $command->addOption('url', null, InputOption::VALUE_REQUIRED,
+ "Forces the value of this option to be used as the URL to Piwik. \nIf your system does not support"
+ . " archiving with CLI processes, you may need to set this in order for the archiving HTTP requests to use"
+ . " the desired URLs.");
$command->addOption('force-all-websites', null, InputOption::VALUE_NONE,
"If specified, the script will trigger archiving on all websites.\nUse with --force-all-periods=[seconds] "
. "to also process those websites that had visits in the last [seconds] seconds.\nLaunching several processes"