fixes on the curate job

This commit is contained in:
Doar Mihai
2026-05-02 01:25:32 +03:00
parent b92e315931
commit 792a598eda
+7 -1
View File
@@ -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)) {