mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
load AWS regions and plans dynamically via SDK (#366)
This commit is contained in:
@ -79,6 +79,7 @@ public static function regions(?int $id): array
|
||||
if (! $id) {
|
||||
return [];
|
||||
}
|
||||
/** @var ?ServerProvider $profile */
|
||||
$profile = self::find($id);
|
||||
if (! $profile) {
|
||||
return [];
|
||||
@ -109,7 +110,7 @@ public static function plans(?int $id, ?string $region): array
|
||||
}
|
||||
|
||||
$plans = $profile->provider()->plans($region);
|
||||
Cache::put('plans-'.$id.'-'.$region, $plans, 600);
|
||||
Cache::put('plans-'.$id.'-'.$region, $plans, 60);
|
||||
|
||||
return $plans;
|
||||
}
|
||||
|
Reference in New Issue
Block a user