docs: add documentation on MessageHandler

This commit is contained in:
Maël Gangloff
2024-12-03 21:10:38 +01:00
parent 2a865a68da
commit dc3879c4c5
7 changed files with 151 additions and 75 deletions

View File

@@ -25,6 +25,11 @@ final readonly class ProcessWatchListsTriggerHandler
*/
public function __invoke(ProcessWatchListsTrigger $message): void
{
/*
* We shuffle the watch lists to process them in an order that we consider random.
* The shuffling is provided by a high-level API of a CSPRNG number generator.
*/
$randomizer = new Randomizer();
$watchLists = $randomizer->shuffleArray($this->watchListRepository->findAll());