Skip to content

Commit

Permalink
Disable Queue (#413)
Browse files Browse the repository at this point in the history
* Update Module.php

* add changelog and fix
  • Loading branch information
nadar committed Dec 19, 2019
1 parent 95e7fe9 commit 98f2d7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ In order to read more about upgrading and BC breaks have a look at the [UPGRADE

## 2.4.0

+ [#413](https://github.com/luyadev/luya-module-admin/pull/413) Option to disable the auto bootstrap of the queue command in conflict siutations.
+ [#409](https://github.com/luyadev/luya-module-admin/issues/409) Bootstrap the native Yii Queue console command in order to use run and listen commands.

## 2.3.0 (12. November 2019)
Expand Down
9 changes: 8 additions & 1 deletion src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ final class Module extends \luya\admin\base\Module implements CoreModuleInterfac
*/
public $autoBootstrapQueue = false;

/**
* @var boolean Whether the `queue` command should be bootstraped automatically. Defaults to true. If already a queue is configured, this might conflict and override
* those settings. Therefore you can disable the bootstrap of `queue` command.
* @since 2.0.4
*/
public $bootstrapQueueCli = true;

/**
* @var boolean The default value for {{luya\admin\models\StorageFile::$inline_disposition}} when uploading a new file. By default this is display which will force a download
* when opening the file url, in order to enable inline disposition (will try to display the file in the browser) set true.
Expand Down Expand Up @@ -506,7 +513,7 @@ public function import(ImportControllerInterface $import)
public function luyaBootstrap(\yii\base\Application $app)
{
// if console application bootstrap the yii2 queue cli command.
if ($app instanceof Application) {
if ($this->bootstrapQueueCli && $app instanceof Application) {
$app->controllerMap['queue'] = [
'class' => Command::class,
'queue' => $app->adminqueue,
Expand Down

0 comments on commit 98f2d7d

Please sign in to comment.