mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
catch subdef exception
This commit is contained in:
@@ -108,7 +108,18 @@ class SubdefCreationWorker implements WorkerInterface
|
|||||||
|
|
||||||
$this->subdefGenerator->setLogger($this->logger);
|
$this->subdefGenerator->setLogger($this->logger);
|
||||||
|
|
||||||
$this->subdefGenerator->generateSubdefs($record, $wantedSubdef);
|
try {
|
||||||
|
$this->subdefGenerator->generateSubdefs($record, $wantedSubdef);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$em->beginTransaction();
|
||||||
|
try {
|
||||||
|
$em->remove($workerRunningJob);
|
||||||
|
$em->flush();
|
||||||
|
$em->commit();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$em->rollback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// begin to check if the subdef is successfully generated
|
// begin to check if the subdef is successfully generated
|
||||||
$subdef = $record->getDatabox()->get_subdef_structure()->getSubdefGroup($record->getType())->getSubdef($payload['subdefName']);
|
$subdef = $record->getDatabox()->get_subdef_structure()->getSubdefGroup($record->getType())->getSubdef($payload['subdefName']);
|
||||||
|
|||||||
Reference in New Issue
Block a user