diff --git a/app/Classes/Jobs/ListBookingsJob.php b/app/Classes/Jobs/ListBookingsJob.php index 41f976a6..b021b71d 100644 --- a/app/Classes/Jobs/ListBookingsJob.php +++ b/app/Classes/Jobs/ListBookingsJob.php @@ -16,6 +16,8 @@ class ListBookingsJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + public $timeout = 900; + /** @var ListGenericJobObject */ private $listGenericJobObject; diff --git a/app/Classes/Jobs/ListDocumentsJob.php b/app/Classes/Jobs/ListDocumentsJob.php index bbadc169..6e93062b 100644 --- a/app/Classes/Jobs/ListDocumentsJob.php +++ b/app/Classes/Jobs/ListDocumentsJob.php @@ -16,6 +16,8 @@ class ListDocumentsJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + public $timeout = 900; + /** @var ListGenericJobObject */ private $listGenericJobObject; diff --git a/app/Classes/Jobs/ListTransactionsJob.php b/app/Classes/Jobs/ListTransactionsJob.php index 6b8913a2..a2b28656 100644 --- a/app/Classes/Jobs/ListTransactionsJob.php +++ b/app/Classes/Jobs/ListTransactionsJob.php @@ -16,6 +16,8 @@ class ListTransactionsJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + public $timeout = 900; + /** @var ListGenericJobObject */ private $listGenericJobObject; diff --git a/app/Classes/Modules/Jobs/Processors/FetchesJobResultProcessor.php b/app/Classes/Modules/Jobs/Processors/FetchesJobResultProcessor.php index e19456e7..89783fe8 100644 --- a/app/Classes/Modules/Jobs/Processors/FetchesJobResultProcessor.php +++ b/app/Classes/Modules/Jobs/Processors/FetchesJobResultProcessor.php @@ -2,6 +2,7 @@ namespace App\Classes\Modules\Jobs\Processors; +use App\Classes\Exceptions\JobResourceNotFoundException; use App\Classes\Modules\Jobs\Services\FetchesJobResult; use Illuminate\Http\Request; use Illuminate\Support\Facades\Log; @@ -32,12 +33,13 @@ class FetchesJobResultProcessor public function execute(Request $request){ $res1 = $this->fetchesJobResult->execute(['job_id' => $request->route('job_id')]); + if($request->route('is_last')){ + $res2 = $this->fetchesJobResult->execute(['request_signature' => $res1->request_signature, 'result_not_null' => true, 'order_by_id_desc' => true]); + return $res2; + } if(!$res1->result){ - Log::info('Job id: '.$request->route('job_id')); - $res2 = $this->fetchesJobResult->execute(['request_signature' => $res1->request_signature, 'result_not_null' => true, 'order_by_id_desc' => true]); - Log::info('Job id: '.$res2->id." , request_signature: ".$res2->request_signature); - return $res2; + throw new JobResourceNotFoundException('Unable to find any job based on the criteria provided'); } return $res1; diff --git a/app/Classes/Modules/Jobs/Processors/UpdateJobResultProcessor.php b/app/Classes/Modules/Jobs/Processors/UpdateJobResultProcessor.php index fff83bb0..0106417d 100644 --- a/app/Classes/Modules/Jobs/Processors/UpdateJobResultProcessor.php +++ b/app/Classes/Modules/Jobs/Processors/UpdateJobResultProcessor.php @@ -44,9 +44,9 @@ class UpdateJobResultProcessor try{ $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){ + //if($resultSignatureExisting != $resultSignatureCurrent){ $this->updateJobResult($jobResultCurrent, $resultCurrentJson, $resultSignatureCurrent, $listGenericJobObject->getJobCommandName(), $listGenericJobObject->getJobCommand()); - } + //} } catch (JobResourceNotFoundException $exception){ $this->updateJobResult($jobResultCurrent, $resultCurrentJson, $resultSignatureCurrent, $listGenericJobObject->getJobCommandName(), $listGenericJobObject->getJobCommand()); } diff --git a/resources/assets/vue/components/bookings/sections/AdminPaymentsBillingSectionComponent.vue b/resources/assets/vue/components/bookings/sections/AdminPaymentsBillingSectionComponent.vue index 03244ff4..966ccbbc 100644 --- a/resources/assets/vue/components/bookings/sections/AdminPaymentsBillingSectionComponent.vue +++ b/resources/assets/vue/components/bookings/sections/AdminPaymentsBillingSectionComponent.vue @@ -90,34 +90,34 @@