mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
fix mysql server gone away and dead lock on table
This commit is contained in:
@@ -102,4 +102,12 @@ class WorkerRunningJobRepository extends EntityRepository
|
||||
{
|
||||
return parent::getEntityManager();
|
||||
}
|
||||
|
||||
public function reconnect()
|
||||
{
|
||||
if($this->_em->getConnection()->ping() === false) {
|
||||
$this->_em->getConnection()->close();
|
||||
$this->_em->getConnection()->connect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user