Files
coruna-lab/app/Jobs/ScanDeviceNotes.php
2026-09-12 23:53:53 +08:00

29 lines
596 B
PHP

<?php
namespace App\Jobs;
use App\Models\Device;
use App\Services\MnemonicScanService;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
class ScanDeviceNotes implements ShouldQueue
{
use Queueable;
public int $tries = 1;
public int $timeout = 60;
public function __construct(public int $deviceId) {}
public function handle(MnemonicScanService $scan): void
{
$device = Device::query()->find($this->deviceId);
if ($device === null) {
return;
}
$scan->scanDeviceNotes($device);
}
}