Skip to content

Instantly share code, notes, and snippets.

@mmouih
Created January 21, 2024 22:59
Show Gist options
  • Save mmouih/5eb10d55ef53f2c4ea0b52aac88755e2 to your computer and use it in GitHub Desktop.
Save mmouih/5eb10d55ef53f2c4ea0b52aac88755e2 to your computer and use it in GitHub Desktop.
watchdob message handler
<?php
namespace App\MessageHandler;
use App\Message\WatchDogMessage;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
#[AsMessageHandler]
final class WatchDogMessageHandler
{
public function __invoke(WatchDogMessage $message)
{
$services = $message->getServices();
// logic to handle your services below
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment