Skip to content

Commit fe8902d

Browse files
committed
fix(config): 配置项
1 parent 6ab594b commit fe8902d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

laravel/config/laravels.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
'handle_static' => env('LARAVELS_HANDLE_STATIC', false),
1313
'laravel_base_path' => env('LARAVEL_BASE_PATH', base_path()),
1414
'inotify_reload' => [
15-
'enable' => env('LARAVELS_INOTIFY_RELOAD', false),
15+
'enable' => env('LARAVELS_INOTIFY_RELOAD', true),
1616
'watch_path' => base_path(),
1717
'file_types' => ['.php'],
1818
'excluded_dirs' => [],
@@ -38,7 +38,11 @@
3838
// \App\Jobs\XxxCronJob::class, // Override the corresponding method to return the configuration
3939
],
4040
],
41-
'events' => [
41+
// 绑定事件与监听器,一个事件可以有多个监听器,多个监听器按顺序执行
42+
'events' => [
43+
\App\Tasks\TaskEvent::class => [
44+
\App\Listeners\TaskListener::class,
45+
],
4246
],
4347
'swoole_tables' => [
4448
],
@@ -56,7 +60,7 @@
5660
'dispatch_mode' => 2,
5761
'reactor_num' => function_exists('\swoole_cpu_num') ? \swoole_cpu_num() * 2 : 4,
5862
'worker_num' => function_exists('\swoole_cpu_num') ? \swoole_cpu_num() * 2 : 8,
59-
//'task_worker_num' => function_exists('\swoole_cpu_num') ? \swoole_cpu_num() * 2 : 8,
63+
'task_worker_num' => function_exists('\swoole_cpu_num') ? \swoole_cpu_num() * 2 : 8,
6064
'task_ipc_mode' => 1,
6165
'task_max_request' => 5000,
6266
'task_tmpdir' => @is_writable('/dev/shm/') ? '/dev/shm' : '/tmp',

0 commit comments

Comments
 (0)