File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 12
12
'handle_static ' => env ('LARAVELS_HANDLE_STATIC ' , false ),
13
13
'laravel_base_path ' => env ('LARAVEL_BASE_PATH ' , base_path ()),
14
14
'inotify_reload ' => [
15
- 'enable ' => env ('LARAVELS_INOTIFY_RELOAD ' , false ),
15
+ 'enable ' => env ('LARAVELS_INOTIFY_RELOAD ' , true ),
16
16
'watch_path ' => base_path (),
17
17
'file_types ' => ['.php ' ],
18
18
'excluded_dirs ' => [],
38
38
// \App\Jobs\XxxCronJob::class, // Override the corresponding method to return the configuration
39
39
],
40
40
],
41
- 'events ' => [
41
+ // 绑定事件与监听器,一个事件可以有多个监听器,多个监听器按顺序执行
42
+ 'events ' => [
43
+ \App \Tasks \TaskEvent::class => [
44
+ \App \Listeners \TaskListener::class,
45
+ ],
42
46
],
43
47
'swoole_tables ' => [
44
48
],
56
60
'dispatch_mode ' => 2 ,
57
61
'reactor_num ' => function_exists ('\swoole_cpu_num ' ) ? \swoole_cpu_num () * 2 : 4 ,
58
62
'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 ,
60
64
'task_ipc_mode ' => 1 ,
61
65
'task_max_request ' => 5000 ,
62
66
'task_tmpdir ' => @is_writable ('/dev/shm/ ' ) ? '/dev/shm ' : '/tmp ' ,
You can’t perform that action at this time.
0 commit comments