A lot of things.
This commit is contained in:
34
app/Jobs/DeleteXenForoCommentsThread.php
Normal file
34
app/Jobs/DeleteXenForoCommentsThread.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\Entry;
|
||||
use App\Services\XenforoApiService;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Queue\Queueable;
|
||||
|
||||
class DeleteXenForoCommentsThread implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public $tries = 3;
|
||||
public $backoff = 10;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct(
|
||||
protected int $threadId,
|
||||
)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*/
|
||||
public function handle(XenforoApiService $service): void
|
||||
{
|
||||
$service->deleteThreadWithEntry($this->threadId);
|
||||
}
|
||||
}
|
||||
34
app/Jobs/RestoreXenForoCommentsThread.php
Normal file
34
app/Jobs/RestoreXenForoCommentsThread.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\Entry;
|
||||
use App\Services\XenforoApiService;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Queue\Queueable;
|
||||
|
||||
class RestoreXenForoCommentsThread implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public $tries = 3;
|
||||
public $backoff = 10;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct(
|
||||
protected int $threadId,
|
||||
)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*/
|
||||
public function handle(XenforoApiService $service): void
|
||||
{
|
||||
$service->restoreThreadWithEntry($this->threadId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user