summaryrefslogtreecommitdiff
path: root/app/Console
diff options
context:
space:
mode:
Diffstat (limited to 'app/Console')
-rw-r--r--app/Console/PluginUpgradeCommand.php3
-rw-r--r--app/Console/WorkerCommand.php28
2 files changed, 30 insertions, 1 deletions
diff --git a/app/Console/PluginUpgradeCommand.php b/app/Console/PluginUpgradeCommand.php
index 6ec5836d..839124b1 100644
--- a/app/Console/PluginUpgradeCommand.php
+++ b/app/Console/PluginUpgradeCommand.php
@@ -3,6 +3,7 @@
namespace Kanboard\Console;
use Kanboard\Core\Plugin\Base as BasePlugin;
+use Kanboard\Core\Plugin\Directory;
use Kanboard\Core\Plugin\Installer;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@@ -24,7 +25,7 @@ class PluginUpgradeCommand extends BaseCommand
}
$installer = new Installer($this->container);
- $availablePlugins = $this->httpClient->getJson(PLUGIN_API_URL);
+ $availablePlugins = Directory::getInstance($this->container)->getAvailablePlugins();
foreach ($this->pluginLoader->getPlugins() as $installedPlugin) {
$pluginDetails = $this->getPluginDetails($availablePlugins, $installedPlugin);
diff --git a/app/Console/WorkerCommand.php b/app/Console/WorkerCommand.php
new file mode 100644
index 00000000..e332624b
--- /dev/null
+++ b/app/Console/WorkerCommand.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Kanboard\Console;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * Class WorkerCommand
+ *
+ * @package Kanboard\Console
+ * @author Frederic Guillot
+ */
+class WorkerCommand extends BaseCommand
+{
+ protected function configure()
+ {
+ $this
+ ->setName('worker')
+ ->setDescription('Execute queue worker')
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $this->queueManager->listen();
+ }
+}