A lot of things
This commit is contained in:
36
app/Jobs/DeleteFile.php
Normal file
36
app/Jobs/DeleteFile.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user