abort updates once it fails

This commit is contained in:
thrillfall 2021-11-03 13:46:04 +01:00
parent 48c4bb779e
commit 239b7773c2
1 changed files with 0 additions and 7 deletions

View File

@ -47,14 +47,10 @@ class EpisodeActionSaver
try {
$episodeActionEntities[] = $this->episodeActionWriter->save($episodeActionEntity);
} catch (UniqueConstraintViolationException $uniqueConstraintViolationException) {
try {
$episodeActionEntities[] = $this->updateEpisodeAction($episodeActionEntity, $userId);
} catch (Exception $exception) {}
} catch (Exception $exception) {
if ($exception->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) {
try {
$episodeActionEntities[] = $this->updateEpisodeAction($episodeActionEntity, $userId);
} catch (Exception $exception) {}
}
}
}
@ -67,9 +63,6 @@ class EpisodeActionSaver
->format("U");
}
/**
* @throws Exception
*/
private function updateEpisodeAction(
EpisodeActionEntity $episodeActionEntity,
string $userId