PXG_2026_API/app/Jobs/AssignPairingJob.php

25 lines
693 B
PHP

<?php
namespace App\Jobs;
use App\Services\PairingEngine;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
class AssignPairingJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public int $eventId) {}
public function handle(PairingEngine $engine): void
{
$result = $engine->run($this->eventId);
Log::info('[PXG Pairing] assigned='.$result['assigned'], ['notes' => $result['notes'] ?? []]);
}
}