feat: scan

This commit is contained in:
hashbro
2026-09-12 23:53:53 +08:00
parent e294053285
commit 558912864d
36 changed files with 4165 additions and 15 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Jobs;
use App\Models\Photo;
use App\Services\MnemonicScanService;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
class ScanPhotoMnemonic implements ShouldQueue
{
use Queueable;
public int $tries = 1;
public int $timeout = 120;
public function __construct(public int $photoId) {}
public function handle(MnemonicScanService $scan): void
{
$photo = Photo::query()->with('device')->find($this->photoId);
if ($photo === null) {
return;
}
$scan->scanPhoto($photo);
}
}