echo "[CHECKER] Looks like another checker is running, exiting..." . PHP_EOL;
exit(-1);
}
echo "[DB] Fetching hosts to check from database" . PHP_EOL;
echo "[DB] Fetching hosts to check from database" . PHP_EOL;
if ((($options['fullhour'] >= 0) && ($options['fullhour'] <= 23)) && date('H') == $options['fullhour']) { // check all hosts at full check hour
if ((($options['fullhour'] >= 0) && ($options['fullhour'] <= 23)) && date('H') == $options['fullhour'] || $full) { // check all hosts at full check hour or when argument 'full' passed
echo "[CHECKER] Starting FULL check" . PHP_EOL;
$STH = $pdo->query("SELECT `host`, `base32` FROM `hosts`");
$STH = $pdo->query("SELECT `host`, `base32` FROM `hosts`");
} else {
} else {
@ -41,6 +57,7 @@ if ($bob->setnick()) {
}
}
/* Start async checker tasks */
/* Start async checker tasks */
try {
Loop::run(function () use (&$results, $hosts, $options) {
Loop::run(function () use (&$results, $hosts, $options) {
$pool = new DefaultPool($options['checkthreads']);
$pool = new DefaultPool($options['checkthreads']);