33use Imi \Log \LogLevel ;
44
55$ rootPath = dirname (__DIR__ ) . '/ ' ;
6+
67return [
7- 'hotUpdate ' => [
8+ 'hotUpdate ' => [
89 // 'status' => false, // 关闭热更新去除注释,不设置即为开启,建议生产环境关闭
910
1011 // --- 文件修改时间监控 ---
1112 // 'monitorClass' => \Imi\HotUpdate\Monitor\FileMTime::class,
12- 'timespan ' => 1 , // 检测时间间隔,单位:秒
13+ 'timespan ' => 1 , // 检测时间间隔,单位:秒
1314
1415 // --- Inotify 扩展监控 ---
1516 // 'monitorClass' => \Imi\HotUpdate\Monitor\Inotify::class,
1617 // 'timespan' => 1, // 检测时间间隔,单位:秒,使用扩展建议设为0性能更佳
1718
1819 // 'includePaths' => [], // 要包含的路径数组
19- 'excludePaths ' => [
20+ 'excludePaths ' => [
2021 $ rootPath . '.git ' ,
2122 $ rootPath . 'bin ' ,
2223 $ rootPath . 'logs ' ,
2324 ], // 要排除的路径数组,支持通配符*
2425 ],
25- 'Logger ' => [
26- 'exHandlers ' => [
26+ 'Logger ' => [
27+ 'exHandlers ' => [
2728 // info 级别日志不输出trace
2829 [
29- 'class ' => \Imi \Log \Handler \File::class,
30- 'options ' => [
30+ 'class ' => \Imi \Log \Handler \File::class,
31+ 'options ' => [
3132 'levels ' => [LogLevel::INFO ],
3233 'fileName ' => dirname (__DIR__ ) . '/.runtime/logs/{Y}-{m}-{d}.log ' ,
33- 'format ' => " {Y}-{m}-{d} {H}:{i}:{s} [{level}] {message} " ,
34+ 'format ' => ' {Y}-{m}-{d} {H}:{i}:{s} [{level}] {message} ' ,
3435 ],
3536 ],
3637 // 指定级别日志输出trace
3738 [
38- 'class ' => \Imi \Log \Handler \File::class,
39- 'options ' => [
39+ 'class ' => \Imi \Log \Handler \File::class,
40+ 'options ' => [
4041 'levels ' => [
4142 LogLevel::ALERT ,
4243 LogLevel::CRITICAL ,
4950 'fileName ' => dirname (__DIR__ ) . '/.runtime/logs/{Y}-{m}-{d}.log ' ,
5051 'format ' => "{Y}-{m}-{d} {H}:{i}:{s} [{level}] {message} \n{trace} " ,
5152 'traceFormat ' => '#{index} {call} called at [{file}:{line}] ' ,
52- 'traceMinimum ' => true ,
53+ 'traceMinimum ' => true ,
5354 ],
54- ]
55+ ],
5556 ],
5657 ],
57- 'AutoRunProcessManager ' => [
58- 'processes ' => [
58+ 'AutoRunProcessManager ' => [
59+ 'processes ' => [
5960 // 加入队列消费进程,非必须,你也可以自己写进程消费
6061 'QueueConsumer ' ,
6162 ],
6263 ],
63- 'imiQueue ' => [
64+ 'imiQueue ' => [
6465 // 默认队列
65- 'default ' => 'test1 ' ,
66+ 'default ' => 'test1 ' ,
6667 // 队列列表
67- 'list ' => [
68+ 'list ' => [
6869 // 队列名称
69- 'test1 ' => [
70+ 'test1 ' => [
7071 // 使用的队列驱动
71- 'driver ' => 'RedisQueueDriver ' ,
72+ 'driver ' => 'RedisQueueDriver ' ,
7273 // 消费协程数量
73- 'co ' => 1 ,
74+ 'co ' => 1 ,
7475 // 消费进程数量;可能会受进程分组影响,以同一组中配置的最多进程数量为准
75- 'process ' => 1 ,
76+ 'process ' => 1 ,
7677 // 消费循环尝试 pop 的时间间隔,单位:秒
77- 'timespan ' => 0.1 ,
78+ 'timespan ' => 0.1 ,
7879 // 进程分组名称
79- 'processGroup ' => 'a ' ,
80+ 'processGroup ' => 'a ' ,
8081 // 自动消费
81- 'autoConsumer ' => true ,
82+ 'autoConsumer ' => true ,
8283 // 消费者类
83- 'consumer ' => 'AConsumer ' ,
84+ 'consumer ' => 'AConsumer ' ,
8485 // 驱动类所需要的参数数组
85- 'config ' => [
86- 'poolName ' => 'redis ' ,
87- 'prefix ' => 'imi:queue:test: ' ,
88- ]
86+ 'config ' => [
87+ 'poolName ' => 'redis ' ,
88+ 'prefix ' => 'imi:queue:test: ' ,
89+ ],
8990 ],
90- 'test2 ' => [
91- 'driver ' => 'RedisQueueDriver ' ,
92- 'co ' => 1 ,
93- 'process ' => 1 ,
94- 'timespan ' => 0.1 ,
95- 'processGroup ' => 'b ' ,
96- 'autoConsumer ' => true ,
97- 'consumer ' => 'BConsumer ' ,
98- 'config ' => [
99- 'poolName ' => 'redis ' ,
100- 'prefix ' => 'imi:queue:test: ' ,
101- ]
91+ 'test2 ' => [
92+ 'driver ' => 'RedisQueueDriver ' ,
93+ 'co ' => 1 ,
94+ 'process ' => 1 ,
95+ 'timespan ' => 0.1 ,
96+ 'processGroup ' => 'b ' ,
97+ 'autoConsumer ' => true ,
98+ 'consumer ' => 'BConsumer ' ,
99+ 'config ' => [
100+ 'poolName ' => 'redis ' ,
101+ 'prefix ' => 'imi:queue:test: ' ,
102+ ],
102103 ],
103104 ],
104105 ],
105- ];
106+ ];
0 commit comments