36 lines
657 B
PHP
36 lines
657 B
PHP
<?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
|
|
{
|
|
if( $this->threadId )
|
|
$service->deleteThreadWithEntry($this->threadId);
|
|
}
|
|
}
|