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 Napoli <matthieu@mnapoli.fr>2015-06-23 17:45:47 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2015-06-24 22:22:02 +0300
commit5d0a82ac14aabe81f68f718391767f443dfb3904 (patch)
tree4496af73611dc6b77a0c36295b13283496d7b514 /plugins
parentfe1c733a9ea006a03356e670896946d63f1792ab (diff)
Show the output of running a single scheduled task
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreAdminHome/Commands/RunScheduledTasks.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/CoreAdminHome/Commands/RunScheduledTasks.php b/plugins/CoreAdminHome/Commands/RunScheduledTasks.php
index 4ff45ce61f..4c231dd3f9 100644
--- a/plugins/CoreAdminHome/Commands/RunScheduledTasks.php
+++ b/plugins/CoreAdminHome/Commands/RunScheduledTasks.php
@@ -45,7 +45,7 @@ class RunScheduledTasks extends ConsoleCommand
$task = $input->getArgument('task');
if ($task) {
- $this->runSingleTask($scheduler, $task);
+ $this->runSingleTask($scheduler, $task, $output);
} else {
$scheduler->run();
}
@@ -62,10 +62,10 @@ class RunScheduledTasks extends ConsoleCommand
}
}
- private function runSingleTask(Scheduler $scheduler, $task)
+ private function runSingleTask(Scheduler $scheduler, $task, OutputInterface $output)
{
try {
- $scheduler->runTaskNow($task);
+ $message = $scheduler->runTaskNow($task);
} catch (\InvalidArgumentException $e) {
$message = $e->getMessage() . PHP_EOL
. 'Available tasks:' . PHP_EOL
@@ -73,5 +73,7 @@ class RunScheduledTasks extends ConsoleCommand
throw new \Exception($message);
}
+
+ $output->writeln($message);
}
}