/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/Messenger/Execution/MessageExecutionStrategyInterface.php
36 строк
985 B
Nicolas Grekas
[Messenger] Add `MessageExecutionStrategyInterface` and refactor `Worker` to use it
16 мар 2026, 11:25
16 мар 2026, 11:25
ce5ffb3
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Messenger\Execution; use Symfony\Component\Messenger\Envelope; interface MessageExecutionStrategyInterface { /** * @param callable(Envelope, string, bool, ?\Throwable): void $onHandled */ public function execute(Envelope $envelope, string $transportName, callable $onHandled): void; public function shouldPauseConsumption(): bool; /** * @param callable(Envelope, string, bool, ?\Throwable): void $onHandled */ public function wait(callable $onHandled): bool; /** * @param callable(Envelope, string, bool, ?\Throwable): void $onHandled */ public function flush(callable $onHandled, bool|float $force = false): bool; public function shutdown(): void; }