From 206df82d63cda6bfda4590fcadb6303dba1c1596 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 23 May 2024 11:12:37 +0200 Subject: [PATCH] fix: Do not pull templates in dev --- app/Jobs/PullTemplatesAndVersions.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/Jobs/PullTemplatesAndVersions.php b/app/Jobs/PullTemplatesAndVersions.php index f9e79cdc3..c4c2619ca 100644 --- a/app/Jobs/PullTemplatesAndVersions.php +++ b/app/Jobs/PullTemplatesAndVersions.php @@ -39,13 +39,15 @@ class PullTemplatesAndVersions implements ShouldQueue, ShouldBeEncrypted ray($e->getMessage()); } try { - ray('PullTemplatesAndVersions service-templates'); - $response = Http::retry(3, 1000)->get(config('constants.services.official')); - if ($response->successful()) { - $services = $response->json(); - File::put(base_path('templates/service-templates.json'), json_encode($services)); - } else { - send_internal_notification('PullTemplatesAndVersions failed with: ' . $response->status() . ' ' . $response->body()); + if (!isDev()) { + ray('PullTemplatesAndVersions service-templates'); + $response = Http::retry(3, 1000)->get(config('constants.services.official')); + if ($response->successful()) { + $services = $response->json(); + File::put(base_path('templates/service-templates.json'), json_encode($services)); + } else { + send_internal_notification('PullTemplatesAndVersions failed with: ' . $response->status() . ' ' . $response->body()); + } } } catch (\Throwable $e) { send_internal_notification('PullTemplatesAndVersions failed with: ' . $e->getMessage());