A lot of things
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\Entry;
|
||||
use App\Models\News;
|
||||
use App\Services\XenforoApiService;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Queue\Queueable;
|
||||
@@ -18,7 +19,7 @@ class CreateXenForoCommentsThread implements ShouldQueue
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct(
|
||||
protected Entry $entry
|
||||
protected Entry|News $entry
|
||||
)
|
||||
{
|
||||
//
|
||||
|
||||
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