diff --git a/include/cron.php b/include/cron.php index 712befb1ff..0c9d6baa58 100644 --- a/include/cron.php +++ b/include/cron.php @@ -215,6 +215,10 @@ function cron_run(&$argv, &$argc){ if(! $interval) $interval = ((get_config('system','delivery_interval') === false) ? 3 : intval(get_config('system','delivery_interval'))); + // If we are using the worker we don't need a delivery interval + if (get_config("system", "worker")) + $interval = false; + $sql_extra = (($manual_id) ? " AND `id` = $manual_id " : ""); reload_plugins(); diff --git a/include/notifier.php b/include/notifier.php index 002b3c8d74..593933b326 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -615,6 +615,10 @@ function notifier_run(&$argv, &$argc){ $interval = ((get_config('system','delivery_interval') === false) ? 2 : intval(get_config('system','delivery_interval'))); + // If we are using the worker we don't need a delivery interval + if (get_config("system", "worker")) + $interval = false; + // delivery loop if(count($r)) { diff --git a/include/poller.php b/include/poller.php index bdf6ba84e9..053880bc59 100644 --- a/include/poller.php +++ b/include/poller.php @@ -39,7 +39,7 @@ function poller_run(&$argv, &$argc){ } else // Sleep two seconds before checking for running processes to avoid having too many workers - sleep(2); + sleep(4); // Checking number of workers $workers = q("SELECT COUNT(*) AS `workers` FROM `workerqueue` WHERE `executed` != '0000-00-00 00:00:00'"); diff --git a/include/queue.php b/include/queue.php index 3f6686ec6e..cb5fe28ad9 100644 --- a/include/queue.php +++ b/include/queue.php @@ -60,6 +60,10 @@ function queue_run(&$argv, &$argc){ $interval = ((get_config('system','delivery_interval') === false) ? 2 : intval(get_config('system','delivery_interval'))); + // If we are using the worker we don't need a delivery interval + if (get_config("system", "worker")) + $interval = false; + $r = q("select * from deliverq where 1"); if($r) { foreach($r as $rr) {