PostgreSQL Support (#4486)
Co-authored-by: Matthew Penner <matthew@pterodactyl.io>
This commit is contained in:
parent
21613fa602
commit
3bf5a71802
223 changed files with 912 additions and 1052 deletions
|
@ -225,8 +225,8 @@ class Node extends Model
|
|||
*/
|
||||
public function isViable(int $memory, int $disk): bool
|
||||
{
|
||||
$memoryLimit = $this->memory * (1 + ($this->memory_overallocate / 100));
|
||||
$diskLimit = $this->disk * (1 + ($this->disk_overallocate / 100));
|
||||
$memoryLimit = $this->memory * (1.0 + ($this->memory_overallocate / 100.0));
|
||||
$diskLimit = $this->disk * (1.0 + ($this->disk_overallocate / 100.0));
|
||||
|
||||
return ($this->sum_memory + $memory) <= $memoryLimit && ($this->sum_disk + $disk) <= $diskLimit;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,9 @@ use Pterodactyl\Notifications\SendPasswordReset as ResetPasswordNotification;
|
|||
* @method static Builder|User whereUsername($value)
|
||||
* @method static Builder|User whereUuid($value)
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
* @mixin \Barryvdh\LaravelIdeHelper\Eloquent
|
||||
* @mixin \Illuminate\Database\Query\Builder
|
||||
* @mixin \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
class User extends Model implements
|
||||
AuthenticatableContract,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue