From: Michael Vogel Date: Thu, 4 Aug 2016 13:41:32 +0000 (+0200) Subject: Lower the priority for stale processes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0411eb289e967dcc0dbd17f4dcba512c5903082e;p=friendica.git Lower the priority for stale processes --- diff --git a/include/poller.php b/include/poller.php index 578f1424eb..73950e35b2 100644 --- a/include/poller.php +++ b/include/poller.php @@ -237,8 +237,11 @@ function poller_kill_stale_workers() { // We killed the stale process. // To avoid a blocking situation we reschedule the process at the beginning of the queue. - q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `created` = '%s', `pid` = 0 WHERE `pid` = %d", + // Additionally we are lowering the priority. + q("UPDATE `workerqueue` SET `executed` = '0000-00-00 00:00:00', `created` = '%s', + `priority` = %d, `pid` = 0 WHERE `pid` = %d", dbesc(datetime_convert()), + intval(PRIORITY_LOW), intval($pid["pid"])); } else logger("Worker process ".$pid["pid"]." now runs for ".round($duration)." minutes. That's okay.", LOGGER_DEBUG);