'basic-console', 'basePath' => dirname(__DIR__), 'bootstrap' => ['queue'], 'controllerNamespace' => 'app\commands', 'aliases' => [ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset', '@tests' => '@app/tests', ], 'components' => [ 'timeZone'=>'PRC', 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'log' => [ 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'db' => $db, 'redis' => [ 'class' => 'yii\redis\Connection', 'hostname' => '127.0.0.1', 'port' =>$redisPort, 'database' => 0, 'password'=>$passWord ], // 'queue'=> [ // // 'class'=> \yii\queue\redis\Queue::class, // // 'redis'=>'redis',// Redis connection component or its config // // 'channel'=>'queue',// Queue channel key queue在redis中key的前缀 // // 'as log'=> \yii\queue\LogBehavior::class, // // ], 'queue' => [ 'class' => \yii\queue\file\Queue::class, // 'as log' => \yii\queue\LogBehavior::class,//错误日志 默认为 console/runtime/logs/app.log 'path' => '@runtime/queue' ], ], 'params' => $params, /* 'controllerMap' => [ 'fixture' => [ // Fixture generation command line. 'class' => 'yii\faker\FixtureController', ], ], */ ]; if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', ]; } return $config;