1
0
mirror of synced 2024-11-28 15:46:04 +03:00
service-bundle/Messenger/MessageHandler.php

23 lines
481 B
PHP
Raw Normal View History

2021-03-31 11:00:48 +03:00
<?php
namespace RetailCrm\ServiceBundle\Messenger;
use RetailCrm\ServiceBundle\Messenger\MessageHandler\JobRunner;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Exception;
class MessageHandler implements MessageHandlerInterface
{
2022-07-20 14:38:42 +03:00
public function __construct(private JobRunner $runner)
2021-03-31 11:00:48 +03:00
{
}
/**
* @throws Exception
*/
public function __invoke(CommandMessage $message): void
{
$this->runner->run($message);
}
}