mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
add logger on mysql timeout and check appbox connection on subdefsjob
This commit is contained in:
@@ -68,6 +68,8 @@ class SubdefsJob extends AbstractJob
|
||||
return;
|
||||
}
|
||||
|
||||
$app->getApplicationBox()->get_connection();
|
||||
|
||||
foreach ($app->getDataboxes() as $databox) {
|
||||
if (!$this->isStarted()) {
|
||||
break;
|
||||
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user