mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-12 23:27:39 +00:00
Refactor transaction handling for signature state changes, to wrap them into transactions
Wrap signature state changes in transactions to prevent race conditions and ensure data integrity. Update controller and test class names to reflect broader state change capabilities. Enhance documentation with comments to clarify transaction requirements and procedure details for signature operations.
This commit is contained in:
@@ -33,9 +33,12 @@ final readonly class PostSignatureStateChangeHandler implements MessageHandlerIn
|
||||
throw new UnrecoverableMessageHandlingException('signature not found');
|
||||
}
|
||||
|
||||
$this->signatureStepStateChanger->onPostMark($signature);
|
||||
$this->entityManager->wrapInTransaction(function () use ($signature) {
|
||||
$this->signatureStepStateChanger->onPostMark($signature);
|
||||
|
||||
$this->entityManager->flush();
|
||||
});
|
||||
|
||||
$this->entityManager->flush();
|
||||
$this->entityManager->clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user