fix: Do not pull templates in dev
This commit is contained in:
parent
54e1e7684d
commit
206df82d63
@ -39,13 +39,15 @@ class PullTemplatesAndVersions implements ShouldQueue, ShouldBeEncrypted
|
|||||||
ray($e->getMessage());
|
ray($e->getMessage());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
ray('PullTemplatesAndVersions service-templates');
|
if (!isDev()) {
|
||||||
$response = Http::retry(3, 1000)->get(config('constants.services.official'));
|
ray('PullTemplatesAndVersions service-templates');
|
||||||
if ($response->successful()) {
|
$response = Http::retry(3, 1000)->get(config('constants.services.official'));
|
||||||
$services = $response->json();
|
if ($response->successful()) {
|
||||||
File::put(base_path('templates/service-templates.json'), json_encode($services));
|
$services = $response->json();
|
||||||
} else {
|
File::put(base_path('templates/service-templates.json'), json_encode($services));
|
||||||
send_internal_notification('PullTemplatesAndVersions failed with: ' . $response->status() . ' ' . $response->body());
|
} else {
|
||||||
|
send_internal_notification('PullTemplatesAndVersions failed with: ' . $response->status() . ' ' . $response->body());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
send_internal_notification('PullTemplatesAndVersions failed with: ' . $e->getMessage());
|
send_internal_notification('PullTemplatesAndVersions failed with: ' . $e->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user