1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2024-11-28 08:58:52 +02:00

perltidy code

This commit is contained in:
Hubert depesz Lubaczewski 2019-05-14 13:05:34 +02:00
parent 06503d10d9
commit f9e0abffe5
5 changed files with 31 additions and 26 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
log
explain.production.json
.vagrant
*.beforeTidy

View File

@ -19,9 +19,11 @@ sub startup {
# array format
my $use_secret = $config->{ secret } || 'Xwyfe-_d:yGDr+p][Vs7Kk+e3mmP=c_|s7hvExF=b|4r4^gO|';
if ( $self->can( 'secrets' ) ) {
# We're on Mojolicious 4.63 or newer
$self->secrets( [ $use_secret ] );
} else {
}
else {
# We're on old Mojolicious
$self->secret( $use_secret );
}

View File

@ -403,13 +403,15 @@ sub info {
next if $module =~ m{^\.?/};
$module =~ s/\.pm$//;
$module =~ s#/#::#g;
push @versions, {
push @versions,
{
'module' => $module,
'version' => $module->VERSION,
};
}
$self->stash( 'modules' => \@versions );
$self->stash( 'perl' => {
$self->stash(
'perl' => {
'version' => $PERL_VERSION,
'binary' => $Config{ 'perlpath' } . $Config{ '_exe' },
}
@ -421,7 +423,8 @@ sub status {
my $self = shift;
if ( $self->database->ping() ) {
$self->render( 'text' => 'OK', status => 200 );
} else {
}
else {
$self->render( 'text' => 'DB FAILED', status => 500 );
}
}

View File

@ -264,8 +264,7 @@ sub get_optimization_path {
my $self = shift;
my ( $plan_id ) = @_;
my $rows = $self->dbh->selectall_arrayref(
'
my $rows = $self->dbh->selectall_arrayref( '
WITH RECURSIVE path AS (
SELECT id, title, optimization_for, 0 as level FROM plans WHERE id = ? and not is_deleted
union all