123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- return [
- 'aliases' => [
- '@bower' => '@vendor/bower-asset',
- '@npm' => '@vendor/npm-asset',
- ],
- 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
- 'bootstrap' => ['queue','queue2'],
- 'components' => [
- 'cache' => [
- 'class' => 'yii\caching\FileCache',
- 'cachePath'=>Yii::getAlias('@common').'/cachefile',
- 'keyPrefix'=>'ygf',
- ],
- 'redis' =>[
- 'class' => 'yii\redis\Connection',
- 'hostname' => '127.0.0.1', //你的redis地址
- 'port' => 6379, //端口
- 'database' => 0,
- ],
- 'queue' => [
- 'class' => \yii\queue\redis\Queue::class,
- 'redis' => 'redis', // 连接组件或它的配置
- 'as log' => \yii\queue\LogBehavior::class,
- 'channel' => 'queueyigou', // Queue channel key
- ],
- //报名邮件发送
- 'queue2' => [
- 'class' => \yii\queue\db\Queue::class,
- 'db' => 'db', // DB 连接组件或它的配置
- 'tableName' => '{{%common_queue}}', // 表名
- 'channel' => 'default', // Queue channel key
- 'mutex' => \yii\mutex\MysqlMutex::class,
- ],
- ],
- ];
|