mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
26 lines
579 B
PHP
26 lines
579 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Services\PriceFetcherService;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
class UpdateAllPricesJob implements ShouldQueue
|
|
{
|
|
use Dispatchable;
|
|
use Queueable;
|
|
|
|
public $timeout = PriceFetcherService::JOB_TIMEOUT;
|
|
|
|
public function __construct(protected array $productIds = []) {}
|
|
|
|
public function handle(): void
|
|
{
|
|
PriceFetcherService::new()
|
|
->setLogging(true)
|
|
->updatePrices($this->productIds);
|
|
}
|
|
}
|