fix handle retry button

This commit is contained in:
arifal
2025-03-25 15:54:02 +07:00
parent e7950e22f2
commit 091b1f305e
10 changed files with 234 additions and 42 deletions

View File

@@ -44,13 +44,21 @@ class ScrapingDataJob implements ShouldQueue
'message' => 'Initiating scraping...',
'response_body' => null,
'status' => 'processing',
'start_time' => now()
'start_time' => now(),
'failed_uuid' => null
]);
$failed_uuid = null;
// Run the scraping services
$service_google_sheet->run_service();
$service_pbg_task->run_service();
$service_tab_pbg_task->run_service();
try{
$service_tab_pbg_task->run_service();
}catch(\Exception $e){
$failed_uuid = $service_tab_pbg_task->getFailedUUID();
throw $e;
}
$data_setting_result = $service_google_sheet->get_big_resume_data();
@@ -72,7 +80,8 @@ class ScrapingDataJob implements ShouldQueue
$import_datasource->update([
'status' => 'failed',
'response_body' => 'Error: ' . $e->getMessage(),
'finish_time' => now()
'finish_time' => now(),
'failed_uuid' => $failed_uuid,
]);
}