mirror of
https://github.com/flarum/framework.git
synced 2025-02-06 06:43:01 +08:00
only show queue commands if using another driver than sync
This commit is contained in:
parent
e8cbdfe6f8
commit
6e4c605da1
|
@ -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