42 lines
928 B
PHP
42 lines
928 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Services\PhotoArchiveIngest;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
class ExtractPhotoArchive implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
public int $tries = 1;
|
|
|
|
public int $timeout = 180;
|
|
|
|
/**
|
|
* @param array<string, mixed> $photoMeta
|
|
* @param array<string, mixed> $rawCounters
|
|
*/
|
|
public function __construct(
|
|
public int $deviceId,
|
|
public string $inboxPath,
|
|
public string $batchBase,
|
|
public array $photoMeta,
|
|
public string $flavor,
|
|
public array $rawCounters,
|
|
) {}
|
|
|
|
public function handle(PhotoArchiveIngest $ingest): void
|
|
{
|
|
$ingest->process(
|
|
$this->deviceId,
|
|
$this->inboxPath,
|
|
$this->batchBase,
|
|
$this->photoMeta,
|
|
$this->flavor,
|
|
$this->rawCounters,
|
|
);
|
|
}
|
|
}
|