feat: add Snipe-IT asset synchronization

This commit is contained in:
2026-08-04 16:15:09 +01:00
parent 604180b735
commit 077015f17a
37 changed files with 1302 additions and 26 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Jobs;
use App\Domain\Inventory\Services\AssetSyncService;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
class SyncSnipeAssets implements ShouldBeUnique, ShouldQueue
{
use Queueable;
public int $tries = 3;
public int $timeout = 900;
public int $uniqueFor = 900;
/** @var list<int> */
public array $backoff = [30, 120, 300];
public function uniqueId(): string
{
return 'snipe-it-assets';
}
public function handle(AssetSyncService $syncService): void
{
$syncService->sync();
}
}