2026-05-27 21:24:44 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Jobs;
|
|
|
|
|
|
|
|
|
|
use App\Models\Entry;
|
2026-06-16 16:21:43 +02:00
|
|
|
use App\Models\News;
|
2026-05-27 21:24:44 +02:00
|
|
|
use App\Services\XenforoApiService;
|
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
|
|
|
|
|
|
class CreateXenForoCommentsThread implements ShouldQueue
|
|
|
|
|
{
|
|
|
|
|
use Queueable;
|
|
|
|
|
|
|
|
|
|
public $tries = 3;
|
|
|
|
|
public $backoff = 10;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new job instance.
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
2026-06-16 16:21:43 +02:00
|
|
|
protected Entry|News $entry
|
2026-05-27 21:24:44 +02:00
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Execute the job.
|
|
|
|
|
*/
|
|
|
|
|
public function handle(XenforoApiService $service): void
|
|
|
|
|
{
|
|
|
|
|
$service->createCommentsThread($this->entry);
|
|
|
|
|
}
|
|
|
|
|
}
|