mirror of
https://github.com/appwrite/appwrite
synced 2026-05-21 16:08:22 +00:00
Read buildSize from plan
This commit is contained in:
parent
81c3d96629
commit
6852ee1f0f
1 changed files with 3 additions and 0 deletions
|
|
@ -629,6 +629,9 @@ class Builds extends Action
|
|||
$durationEnd = \microtime(true);
|
||||
|
||||
$buildSizeLimit = (int)System::getEnv('_APP_FUNCTIONS_BUILD_SIZE_LIMIT', '2000000000');
|
||||
if (isset($plan['buildSize'])) {
|
||||
$buildSizeLimit = $plan['buildSize'] * 1000 * 1000 * 1000;
|
||||
}
|
||||
if ($response['size'] > $buildSizeLimit) {
|
||||
throw new \Exception('Build size should be less than ' . number_format($buildSizeLimit / (1000 * 1000), 2) . ' MBs.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue