import email unlock tables
This commit is contained in:
@@ -368,9 +368,7 @@ class EmailAccount extends Record
|
||||
$email = $importer->importMessage($parserName, $message, $userId, $teamIdList, $userIdList, $filterCollection, $fetchOnlyHeader, $folderData);
|
||||
} catch (\Exception $e) {
|
||||
$GLOBALS['log']->error('EmailAccount '.$emailAccount->id.' (Import Message w/ '.$parserName.'): [' . $e->getCode() . '] ' .$e->getMessage());
|
||||
if ($e->getCode() === 'HY000' && strpos($e->getMessage(), '1100') !== false) {
|
||||
$this->getEntityManager()->getPdo()->query('UNLOCK TABLES');
|
||||
}
|
||||
$this->getEntityManager()->getPdo()->query('UNLOCK TABLES');
|
||||
}
|
||||
return $email;
|
||||
}
|
||||
|
||||
@@ -394,9 +394,7 @@ class InboundEmail extends \Espo\Services\Record
|
||||
$email = $importer->importMessage($parserName, $message, $userId, $teamIdList, $userIdList, $filterCollection, $fetchOnlyHeader, $folderData);
|
||||
} catch (\Exception $e) {
|
||||
$GLOBALS['log']->error('InboundEmail '.$emailAccount->id.' (Import Message w/ '.$parserName.'): [' . $e->getCode() . '] ' .$e->getMessage());
|
||||
if ($e->getCode() === 'HY000' && strpos($e->getMessage(), '1100') !== false) {
|
||||
$this->getEntityManager()->getPdo()->query('UNLOCK TABLES');
|
||||
}
|
||||
$this->getEntityManager()->getPdo()->query('UNLOCK TABLES');
|
||||
}
|
||||
return $email;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user