Download app/Services/MemoryLimit.php from pnacorp/magicai: direct link, hf CLI and curl.
- Browser
- Download file 525 Bytes
-
https://huggingface.co/pnacorp/magicai/resolve/main/app/Services/MemoryLimit.php
- Command line
-
hf download hf://pnacorp/magicai/app/Services/MemoryLimit.php
-
curl -L -o MemoryLimit.php https://huggingface.co/pnacorp/magicai/resolve/main/app/Services/MemoryLimit.php
525 Bytes
| namespace App\Services; | |
| use Spatie\Health\Checks\Check; | |
| use Spatie\Health\Checks\Result; | |
| class MemoryLimit extends Check | |
| { | |
| public function run(): Result | |
| { | |
| $memoryLimit = getServerMemoryLimit(); | |
| $result = \Spatie\Health\Checks\Result::make(); | |
| if ($memoryLimit == -1) { | |
| return $result->ok(__('Unlimited')); | |
| } | |
| if ($memoryLimit < 64) { | |
| return $result->failed("{$memoryLimit}M"); | |
| } | |
| return $result->ok("{$memoryLimit}M"); | |
| } | |
| } | |