Files
portal/app/Classes/Jobs/FetchLoadedContainersFromVTPortalJob.php
T
2021-08-23 09:35:37 +08:00

47 lines
1.5 KiB
PHP

<?php
namespace App\Classes\Jobs;
use App\Classes\Modules\PackingLists\Processors\FetchLoadedContainersFromVTPortalProcessor;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class FetchLoadedContainersFromVTPortalJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** @var FetchLoadedContainersFromVTPortalProcessor */
private $fetchLoadedContainersFromVTPortalProcessor;
/**
* FetchLoadedContainersFromVTPortalJob constructor.
* @param FetchLoadedContainersFromVTPortalProcessor $fetchLoadedContainersFromVTPortalProcessor
*/
public function __construct(FetchLoadedContainersFromVTPortalProcessor $fetchLoadedContainersFromVTPortalProcessor)
{
$this->fetchLoadedContainersFromVTPortalProcessor = $fetchLoadedContainersFromVTPortalProcessor;
}
/**
* Execute the job.
*
* @param Carbon|null $start
* @param Carbon|null $end
* @return void
* @throws \App\Classes\Exceptions\AccessForbiddenException
* @throws \App\Classes\Exceptions\MalformedRequestException
* @throws \App\Classes\Exceptions\RequestValidationException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function handle(?Carbon $start = null, ?Carbon $end = null)
{
$this->fetchLoadedContainersFromVTPortalProcessor->execute($start, $end);
}
}