2026-02-08 18:04:18 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Jobs;
|
|
|
|
|
|
2026-02-15 20:10:18 +00:00
|
|
|
use App\Services\ProcessUpdateService;
|
2026-02-08 18:04:18 +01:00
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
2026-02-15 20:10:18 +00:00
|
|
|
use Illuminate\Foundation\Queue\Queueable;
|
2026-02-08 18:04:18 +01:00
|
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
|
|
class ProcessEntryUpdate implements ShouldQueue
|
|
|
|
|
{
|
|
|
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new job instance.
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
|
|
|
|
public int $entryId,
|
2026-02-15 20:10:18 +00:00
|
|
|
public string $action,
|
|
|
|
|
public string $type = 'entry_update_'
|
2026-02-08 18:04:18 +01:00
|
|
|
) {
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Execute the job.
|
|
|
|
|
*/
|
|
|
|
|
public function handle(): void
|
|
|
|
|
{
|
2026-02-15 20:10:18 +00:00
|
|
|
(new ProcessUpdateService)->processUpdate($this->entryId, $this->action, $this->type);
|
2026-02-08 18:04:18 +01:00
|
|
|
}
|
|
|
|
|
}
|