This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
roadrunner.php
122 lines (104 loc) Β· 3.8 KB
/
roadrunner.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
use Spiral\RoadRunnerLaravel\Events;
use Spiral\RoadRunnerLaravel\Defaults;
use Spiral\RoadRunnerLaravel\Listeners;
use Spiral\RoadRunner\Environment\Mode;
return [
/*
|--------------------------------------------------------------------------
| Force HTTPS Schema Usage
|--------------------------------------------------------------------------
|
| Set this value to `true` if your application uses HTTPS (required for
| correct links generation, for example).
|
*/
'force_https' => (bool) env('APP_FORCE_HTTPS', false),
/*
|--------------------------------------------------------------------------
| Event Listeners
|--------------------------------------------------------------------------
|
| Worker provided by this package allows to interacts with request
| processing loop using application events.
|
| Feel free to add your own event listeners.
|
*/
'listeners' => [
Events\BeforeLoopStartedEvent::class => [
...Defaults::beforeLoopStarted(),
],
Events\BeforeLoopIterationEvent::class => [
...Defaults::beforeLoopIteration(),
],
Events\BeforeRequestHandlingEvent::class => [
...Defaults::beforeRequestHandling(),
Listeners\InjectStatsIntoRequestListener::class,
],
Events\AfterRequestHandlingEvent::class => [
...Defaults::afterRequestHandling(),
],
Events\AfterLoopIterationEvent::class => [
...Defaults::afterLoopIteration(),
Listeners\RunGarbageCollectorListener::class, // keep the memory usage low
// Listeners\CleanupUploadedFilesListener::class, // remove temporary files
],
Events\AfterLoopStoppedEvent::class => [
...Defaults::afterLoopStopped(),
],
Events\LoopErrorOccurredEvent::class => [
...Defaults::loopErrorOccurred(),
Listeners\SendExceptionToStderrListener::class,
Listeners\StopWorkerListener::class,
],
],
/*
|--------------------------------------------------------------------------
| Containers Pre Resolving / Clearing
|--------------------------------------------------------------------------
|
| The bindings listed below will be resolved before the events loop
| starting. Clearing a binding will force the container to resolve that
| binding again when asked.
|
| Feel free to add your own bindings here.
|
*/
'warm' => [
...Defaults::servicesToWarm(),
],
'clear' => [
...Defaults::servicesToClear(),
'auth', // is not required for Laravel >= v8.35
],
/*
|--------------------------------------------------------------------------
| Reset Providers
|--------------------------------------------------------------------------
|
| Providers that will be registered on every request.
|
| Feel free to add your service-providers here.
|
*/
'reset_providers' => [
...Defaults::providersToReset(),
Illuminate\Auth\AuthServiceProvider::class, // is not required for Laravel >= v8.35
Illuminate\Pagination\PaginationServiceProvider::class, // is not required for Laravel >= v8.35
],
/*
|--------------------------------------------------------------------------
| Worker Classes
|--------------------------------------------------------------------------
|
| Here you can override the worker class for processing different kinds of
| jobs, that received from the RoadRunner daemon. The key is a worker mode.
|
*/
'workers' => [
Mode::MODE_HTTP => \Spiral\RoadRunnerLaravel\Worker::class,
// Mode::MODE_JOBS => ...,
// Mode::MODE_TEMPORAL => ...,
],
];