2020-08-28 07:04:23 +00:00
|
|
|
<?php
|
2020-10-14 22:19:31 +00:00
|
|
|
|
2021-07-19 05:53:45 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-08-28 07:04:23 +00:00
|
|
|
namespace App\Message;
|
|
|
|
|
2021-08-11 15:31:02 +00:00
|
|
|
use App\Entity\Api\NowPlaying\NowPlaying;
|
2021-12-11 03:48:19 +00:00
|
|
|
use App\MessageQueue\QueueManagerInterface;
|
2020-08-28 07:04:23 +00:00
|
|
|
|
2022-07-01 06:06:29 +00:00
|
|
|
final class DispatchWebhookMessage extends AbstractUniqueMessage
|
2020-08-28 07:04:23 +00:00
|
|
|
{
|
2021-02-04 21:47:08 +00:00
|
|
|
public int $station_id;
|
2020-08-28 07:04:23 +00:00
|
|
|
|
|
|
|
public NowPlaying $np;
|
|
|
|
|
2021-07-19 05:53:45 +00:00
|
|
|
/** @var array<string> */
|
2020-08-28 07:04:23 +00:00
|
|
|
public array $triggers = [];
|
2020-09-26 23:05:33 +00:00
|
|
|
|
|
|
|
public function getIdentifier(): string
|
|
|
|
{
|
2021-02-04 21:47:08 +00:00
|
|
|
return 'DispatchWebhookMessage_' . $this->station_id;
|
2020-09-26 23:05:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getQueue(): string
|
|
|
|
{
|
2021-12-11 03:48:19 +00:00
|
|
|
return QueueManagerInterface::QUEUE_HIGH_PRIORITY;
|
2020-09-26 23:05:33 +00:00
|
|
|
}
|
2020-08-28 07:04:23 +00:00
|
|
|
}
|