Browse Source

Don't use a delivery interval when using the worker

pull/1912/head
Michael Vogel 6 years ago
parent
commit
7edce8e266
  1. 4
      include/cron.php
  2. 4
      include/notifier.php
  3. 2
      include/poller.php
  4. 4
      include/queue.php

4
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();

4
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)) {

2
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'");

4
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) {

Loading…
Cancel
Save