Giant Update
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\NotificationBroadcast;
|
||||
use App\Services\Notification\NotificationService;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Queue\Queueable;
|
||||
|
||||
class ProcessBroadcast implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public int $tries = 3;
|
||||
|
||||
public function __construct(public int $broadcastId) {}
|
||||
|
||||
public function handle(NotificationService $service): void
|
||||
{
|
||||
$broadcast = NotificationBroadcast::with(['tenant', 'template', 'channelConfig'])->find($this->broadcastId);
|
||||
if ($broadcast) {
|
||||
$service->processBroadcast($broadcast);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user