Files
RomhackPlaza/app/Jobs/RestoreXenForoCommentsThread.php

36 lines
659 B
PHP
Raw Normal View History

2026-06-08 16:25:52 +02:00
<?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(
2026-06-23 19:24:38 +02:00
protected ?int $threadId,
2026-06-08 16:25:52 +02:00
)
{
//
}
/**
* Execute the job.
*/
public function handle(XenforoApiService $service): void
{
2026-06-23 19:24:38 +02:00
if( $this->threadId )
$service->restoreThreadWithEntry($this->threadId);
2026-06-08 16:25:52 +02:00
}
}