1
0
mirror of https://github.com/flarum/core.git synced 2025-07-29 20:50:28 +02:00

only show queue commands if using another driver than sync

This commit is contained in:
Daniël Klabbers
2019-11-13 13:17:01 +01:00
parent 406c8ff834
commit 17074b8aab

View File

@@ -107,6 +107,13 @@ class QueueServiceProvider extends AbstractServiceProvider
protected function registerCommands()
{
$this->app['events']->listen(Configuring::class, function (Configuring $event) {
$queue = $this->app->make(Queue::class);
// There is no need to have the queue commands when using the sync driver.
if ($queue instanceof SyncQueue) {
return;
}
foreach ($this->commands as $command) {
$event->addCommand($command);
}