mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-24 00:27:47 +00:00
chore: inspect staged changes for commit message
This commit is contained in:
@@ -1057,7 +1057,6 @@ function sslip(Server $server)
|
||||
|
||||
function get_service_templates(bool $force = false): Collection
|
||||
{
|
||||
|
||||
if ($force) {
|
||||
try {
|
||||
$response = Http::retry(3, 1000)->get(config('constants.services.official'));
|
||||
@@ -1068,15 +1067,16 @@ function get_service_templates(bool $force = false): Collection
|
||||
|
||||
return collect($services);
|
||||
} catch (Throwable) {
|
||||
$services = File::get(base_path('templates/'.config('constants.services.file_name')));
|
||||
|
||||
return collect(json_decode($services))->sortKeys();
|
||||
return get_service_templates();
|
||||
}
|
||||
} else {
|
||||
$services = File::get(base_path('templates/'.config('constants.services.file_name')));
|
||||
|
||||
return collect(json_decode($services))->sortKeys();
|
||||
}
|
||||
|
||||
$path = base_path('templates/'.config('constants.services.file_name'));
|
||||
$mtime = filemtime($path) ?: 0;
|
||||
|
||||
return Cache::remember("service-templates:{$mtime}", now()->addDay(), function () use ($path) {
|
||||
return collect(json_decode(File::get($path)))->sortKeys();
|
||||
});
|
||||
}
|
||||
|
||||
function getResourceByUuid(string $uuid, ?int $teamId = null)
|
||||
|
||||
Reference in New Issue
Block a user