@ -254,7 +254,7 @@ function poller_kill_stale_workers() {
q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `created` = '%s',
`priority`=%d,`pid`=0WHERE`pid`=%d",
dbesc(datetime_convert()),
intval(PRIORITY_LOW),
intval(PRIORITY_NEGLIGIBLE),
intval($pid["pid"]));
}else
logger("Worker process ".$pid["pid"]." (".implode("",$argv).") now runs for ".round($duration)." of ".$max_duration." allowed minutes. That's okay.",LOGGER_DEBUG);
@ -294,12 +294,11 @@ function poller_too_much_workers() {
$s=q("SELECT `priority` FROM `workerqueue` WHERE `executed` = '0000-00-00 00:00:00' ORDER BY `priority` LIMIT 1");
$top_priority=$s[0]["priority"];
$s=q("SELECT COUNT(*) AS `total` FROM `workerqueue` WHERE `priority` <= %d AND `executed` != '0000-00-00 00:00:00'",
$s=q("SELECT `id` FROM `workerqueue` WHERE `priority` <= %d AND `executed` != '0000-00-00 00:00:00' LIMIT 1",