File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,6 +286,11 @@ function () use ( $slim ) {
286286 $ page ->setBaseUrl ( 'https://sge-jobs.toolforge.org ' );
287287 $ page ( '/ ' );
288288 } )->name ( 'oge-status ' );
289+
290+ $ slim ->get ( 'healthz ' , function () use ( $ slim ) {
291+ $ page = new Pages \Healthz ();
292+ $ page ();
293+ } )->name ( 'healthz ' );
289294 }
290295 ); // end group '/'
291296
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of Toolforge Admin
4+ * Copyright (C) 2016 Wikimedia Foundation and contributors
5+ *
6+ * This program is free software: you can redistribute it and/or modify it
7+ * under the terms of the GNU General Public License as published by the Free
8+ * Software Foundation, either version 3 of the License, or (at your option)
9+ * any later version.
10+ *
11+ * This program is distributed in the hope that it will be useful, but WITHOUT
12+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14+ * more details.
15+ *
16+ * You should have received a copy of the GNU General Public License along
17+ * with this program. If not, see <http://www.gnu.org/licenses/>.
18+ */
19+
20+ namespace Tools \Admin \Pages ;
21+
22+ use Wikimedia \Slimapp \Controller ;
23+
24+ /**
25+ * Returns a 200 response.
26+ */
27+ class Healthz extends Controller {
28+ protected function handleGet () {
29+ $ this ->contentType ( 'text/plain ' );
30+ echo "OK " ;
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments