This commit refactors the import statements in various controllers and jobs to improve code organization and readability. Unused imports were removed, and necessary imports were added to ensure proper functionality.
35 lines
859 B
PHP
35 lines
859 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Contracts\ActionInputEmpty;
|
|
use App\Contracts\Executor;
|
|
use App\Cqs\Actions\ProductIncos\SynchronizeProductIncosWithArcadiaApi;
|
|
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
class FetchAndUpsertArcadiaProductIncos implements ShouldBeUnique, ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
/** Retain unique lock for 3600 seconds (1 hour) */
|
|
public int $uniqueFor = 3600;
|
|
|
|
public function uniqueId(): string
|
|
{
|
|
return 'fetch-and-upsert-arcadia-product-incos';
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*/
|
|
public function handle(
|
|
Executor $executor,
|
|
SynchronizeProductIncosWithArcadiaApi $action
|
|
): void {
|
|
$executor->execute($action, new ActionInputEmpty());
|
|
}
|
|
}
|