You've already forked explain.depesz.com
mirror of
https://gitlab.com/depesz/explain.depesz.com.git
synced 2025-07-03 00:58:12 +02:00
Implement /status to show if db is accessible
This commit is contained in:
@ -412,6 +412,15 @@ sub info {
|
||||
|
||||
}
|
||||
|
||||
sub status {
|
||||
my $self = shift;
|
||||
if ($self->database->ping()) {
|
||||
$self->render('text' => 'OK', status => 200);
|
||||
} else {
|
||||
$self->render('text' => 'DB FAILED', status => 500);
|
||||
}
|
||||
}
|
||||
|
||||
sub help {
|
||||
|
||||
# direct to template
|
||||
|
Reference in New Issue
Block a user