add logger on mysql timeout and check appbox connection on subdefsjob

This commit is contained in:
aina-esokia
2018-07-27 15:34:56 +04:00
parent 5aaf0b8782
commit e9b6d55335
2 changed files with 6 additions and 0 deletions

View File

@@ -140,6 +140,10 @@ abstract class base implements cache_cacheableInterface
public function get_connection()
{
if($this->connection->ping() === false){
if(isset($this->app['task-manager.logger'])){
$this->app['task-manager.logger']->info("MySQL server is not available : close and connect .....");
}
$this->connection->close();
$this->connection->connect();
}