fix handle null on scraping google sheet data and add detail data building

This commit is contained in:
arifal
2025-06-23 13:54:26 +07:00
parent ccff82bd22
commit 200b398868
6 changed files with 160 additions and 129 deletions

View File

@@ -32,6 +32,7 @@ class ScrapingDataJob implements ShouldQueue
*/
public function handle()
{
$failed_uuid = null;
try {
$client = app(Client::class);
@@ -48,8 +49,6 @@ class ScrapingDataJob implements ShouldQueue
'failed_uuid' => null
]);
$failed_uuid = null;
// Run the scraping services
$service_google_sheet->run_service();
$service_pbg_task->run_service();
@@ -79,6 +78,7 @@ class ScrapingDataJob implements ShouldQueue
if (isset($import_datasource)) {
$import_datasource->update([
'status' => 'failed',
'message' => 'Terjadi kesalahan, Syncronize tidak selesai',
'response_body' => 'Terjadi kesalahan, Syncronize tidak selesai',
'finish_time' => now(),
'failed_uuid' => $failed_uuid,