Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: Do not pull templates in dev

Andras Bacsai206df82d63cd
diff --git a/app/Jobs/PullTemplatesAndVersions.php b/app/Jobs/PullTemplatesAndVersions.php
index f9e79cdc35..c4c2619cae 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());