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)) {