mirror of
https://github.com/flarum/framework.git
synced 2025-02-02 03:27:47 +08:00
only show queue commands if using another driver than sync
This commit is contained in:
parent
406c8ff834
commit
17074b8aab
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user