Files
RomhackPlaza/app/Jobs/DeleteFile.php
2026-06-16 16:21:43 +02:00

37 lines
692 B
PHP

<?php
namespace App\Jobs;
use App\Models\EntryFile;
use App\Services\FileServersService;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
class DeleteFile implements ShouldQueue
{
use Queueable;
public $tries = 3;
public $backoff = 10;
/**
* Create a new job instance.
*/
public function __construct(
public string $filePath,
public string $fileName,
public int $userId
)
{
//
}
/**
* Execute the job.
*/
public function handle(FileServersService $service): void
{
$service->deleteFile($this->filePath, $this->fileName, $this->userId);
}
}