You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
78
+
location /cloud-scheduler-job {
79
+
proxy_connect_timeout 600s;
80
+
proxy_read_timeout 600s;
81
+
fastcgi_read_timeout 600s;
82
+
}
108
83
109
-
class PreventRequestsDuringMaintenance extends Middleware
110
-
{
111
-
/**
112
-
* The URIs that should be reachable while maintenance mode is enabled.
113
-
*
114
-
* @var array
115
-
*/
116
-
protected $except = [
117
-
+ '/cloud-scheduler-job',
118
-
];
84
+
# other locations and server configuration ...
119
85
}
120
86
121
87
```
122
-
</details>
123
88
124
-
(4) Optional: set application `RUNNING_IN_CONSOLE` (highly recommended)
89
+
Optional, but highly recommended: set application `RUNNING_IN_CONSOLE`
125
90
126
91
Some Laravel service providers only register their commands if the application is being accessed through the command line (Artisan). Because we are calling Laravel scheduler from a HTTP call, that means some commands may never register, such as the Laravel Scout command:
127
92
@@ -207,6 +172,59 @@ $app = new Illuminate\Foundation\Application(
207
172
```
208
173
</details>
209
174
175
+
Optional: whitelist route for maintenance mode
176
+
177
+
If you want to allow jobs to keep running if the application is down (`php artisan down`), update the following:
0 commit comments