fix quota check condition

This commit is contained in:
ghost 2023-04-23 04:31:32 +03:00
parent 8dbb4a06af
commit 5936fa9a30

View File

@ -9,13 +9,6 @@ if (false === sem_acquire($semaphore, true)) {
exit; exit;
} }
// Check disk quota
if (CRAWL_STOP_DISK_QUOTA_MB_LEFT > disk_free_space('/') / 1000000) {
echo 'Disk quota reached.' . PHP_EOL;
exit;
}
// Load system dependencies // Load system dependencies
require_once('../config/app.php'); require_once('../config/app.php');
require_once('../library/curl.php'); require_once('../library/curl.php');
@ -24,6 +17,13 @@ require_once('../library/filter.php');
require_once('../library/parser.php'); require_once('../library/parser.php');
require_once('../library/mysql.php'); require_once('../library/mysql.php');
// Check disk quota
if (CRAWL_STOP_DISK_QUOTA_MB_LEFT > disk_free_space('/') / 1000000) {
echo 'Disk quota reached.' . PHP_EOL;
exit;
}
// Debug // Debug
$timeStart = microtime(true); $timeStart = microtime(true);