mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 23:13:59 +00:00
Laravel Vapor - Renamed a file to fit its purpose (code sync from shipping portal)
This commit is contained in:
@@ -6,7 +6,7 @@ namespace App\Classes\Modules\Jobs\Processors;
|
||||
use App\Classes\Modules\Jobs\Services\UpdatesJobResult;
|
||||
use App\Classes\Modules\Jobs\Services\FetchesJobResult;
|
||||
use App\Classes\Exceptions\JobResourceNotFoundException;
|
||||
use App\Classes\Modules\Jobs\DataTransferObjects\ListGenericJobObject;
|
||||
use App\Classes\Modules\Jobs\DataTransferObjects\JobSubmissionObject;
|
||||
use App\Classes\Modules\Jobs\DataTransferObjects\UpdateJobResultObject;
|
||||
|
||||
class UpdateJobResultProcessor
|
||||
@@ -30,14 +30,14 @@ class UpdateJobResultProcessor
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ListGenericJobObject $listGenericJobObject
|
||||
* @param JobSubmissionObject $jobSubmissionObject
|
||||
* @param array $resultCurrent
|
||||
* @return void
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\JobResourceNotFoundException
|
||||
*/
|
||||
public function execute(ListGenericJobObject $listGenericJobObject, $resultCurrent) {
|
||||
$jobResultCurrent = $this->fetchesJobResult->execute(['job_id' => $listGenericJobObject->getJobId()]);
|
||||
public function execute(JobSubmissionObject $jobSubmissionObject, $resultCurrent) {
|
||||
$jobResultCurrent = $this->fetchesJobResult->execute(['job_id' => $jobSubmissionObject->getJobId()]);
|
||||
$resultCurrentJson = json_encode($resultCurrent);
|
||||
$resultSignatureCurrent = md5($resultCurrentJson);
|
||||
|
||||
@@ -45,10 +45,10 @@ class UpdateJobResultProcessor
|
||||
$jobResultExisting = $this->fetchesJobResult->execute(['request_signature' => $jobResultCurrent->request_signature, 'result_not_null' => true, 'order_by_id_desc' => true]);
|
||||
$resultSignatureExisting = $jobResultExisting->result_signature;
|
||||
//if($resultSignatureExisting != $resultSignatureCurrent){
|
||||
$this->updateJobResult($jobResultCurrent, $resultCurrentJson, $resultSignatureCurrent, $listGenericJobObject->getJobCommandName(), $listGenericJobObject->getJobCommand());
|
||||
$this->updateJobResult($jobResultCurrent, $resultCurrentJson, $resultSignatureCurrent, $jobSubmissionObject->getJobCommandName(), $jobSubmissionObject->getJobCommand());
|
||||
//}
|
||||
} catch (JobResourceNotFoundException $exception){
|
||||
$this->updateJobResult($jobResultCurrent, $resultCurrentJson, $resultSignatureCurrent, $listGenericJobObject->getJobCommandName(), $listGenericJobObject->getJobCommand());
|
||||
$this->updateJobResult($jobResultCurrent, $resultCurrentJson, $resultSignatureCurrent, $jobSubmissionObject->getJobCommandName(), $jobSubmissionObject->getJobCommand());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user