Browse Source

* LDV : database connection keepalive

master
Alex 'AdUser' Z 6 years ago
parent
commit
57bf95747d
  1. 5
      lib/LDV.pm

5
lib/LDV.pm

@ -41,6 +41,11 @@ sub startup {
$db->connect;
return $db;
});
my $loop = Mojo::IOLoop->singleton;
$loop->recurring(60 => sub {
$self->app->db->ping;
$self->app->log->debug("db ping, process $$");
});
my $r = $self->routes;

Loading…
Cancel
Save