init admin
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
return [
|
||||
'enable' => true,
|
||||
];
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Webman\RedisQueue\Command\MakeConsumerCommand;
|
||||
|
||||
return [
|
||||
MakeConsumerCommand::class
|
||||
];
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of webman.
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the MIT-LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @author walkor<walkor@workerman.net>
|
||||
* @copyright walkor<walkor@workerman.net>
|
||||
* @link http://www.workerman.net/
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
return [
|
||||
'default' => [
|
||||
'handlers' => [
|
||||
[
|
||||
'class' => Monolog\Handler\RotatingFileHandler::class,
|
||||
'constructor' => [
|
||||
runtime_path() . '/logs/redis-queue/queue.log',
|
||||
7, //$maxFiles
|
||||
Monolog\Logger::DEBUG,
|
||||
],
|
||||
'formatter' => [
|
||||
'class' => Monolog\Formatter\LineFormatter::class,
|
||||
'constructor' => [null, 'Y-m-d H:i:s', true],
|
||||
],
|
||||
]
|
||||
],
|
||||
]
|
||||
];
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
return [
|
||||
'consumer' => [
|
||||
'handler' => Webman\RedisQueue\Process\Consumer::class,
|
||||
'count' => \support\Env::get('app.debug',false) ? 2 : cpu_count() * 4,
|
||||
'constructor' => [
|
||||
// 消费者类目录
|
||||
'consumer_dir' => app_path() . '/queue/redis'
|
||||
]
|
||||
],
|
||||
'redis_consumer_slow' => [ // key是自定义的,没有格式限制,这里取名redis_consumer_slow
|
||||
'handler' => Webman\RedisQueue\Process\Consumer::class,
|
||||
'count' => 1,
|
||||
'constructor' => [
|
||||
// 消费者类目录
|
||||
'consumer_dir' => app_path() . '/queue/single'
|
||||
]
|
||||
]
|
||||
];
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
return [
|
||||
'default' => [
|
||||
'host' => 'redis://'.\support\Env::get('redis.host','127.0.0.1').':'.\support\Env::get('redis.port',6379),
|
||||
'options' => [
|
||||
'auth' => \support\Env::get('redis.password',null), // 密码,字符串类型,可选参数
|
||||
'db' => \support\Env::get('redis.database',0), // 数据库
|
||||
'prefix' => \support\Env::get('redis.prefix'), // key 前缀
|
||||
'max_attempts' => 5, // 消费失败后,重试次数
|
||||
'retry_seconds' => 10, // 重试间隔,单位秒
|
||||
]
|
||||
]
|
||||
];
|
||||
Reference in New Issue
Block a user