|
|
@ -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); |
|
|
|
|
|
|
|
|
|
|
|