From 792a598eda319c331771e4cc6cf5dfd01396af39 Mon Sep 17 00:00:00 2001 From: Doar Mihai Date: Sat, 2 May 2026 01:25:32 +0300 Subject: [PATCH] fixes on the curate job --- app/Console/Commands/CurateJobs.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/CurateJobs.php b/app/Console/Commands/CurateJobs.php index 13cef6d..3881f02 100644 --- a/app/Console/Commands/CurateJobs.php +++ b/app/Console/Commands/CurateJobs.php @@ -61,7 +61,7 @@ class CurateJobs extends Command $body .= 'RETURN ONLY VALID JSON, NO TEXT BEFORE OR AFTER THE JSON!'; // Make POST request to API with job name and description - $response = Http::timeout(130) + $response = Http::timeout(300) ->withHeaders([ 'Accept' => 'application/json', 'CF-Access-Client-Id' => '8c4cc272c7f08f8d7911a28eb5d7db44.access', @@ -76,7 +76,13 @@ class CurateJobs extends Command $responseArray = $response->json(); $responseTagsJson = $responseArray['response']; + Log::info("Curated job id: {$responseArray['job_id']} Result: {$responseTagsJson}"); $tags = json_decode($responseTagsJson, true); + + if (empty($tags) || $tags === null) { + continue; + } + $tags = array_flip($tags); if (is_array($tags) && !empty($tags)) {