mirror of
https://github.com/friendica/friendica
synced 2025-04-19 06:30:10 +00:00
allow zero delivery interval on dedicated servers
This commit is contained in:
parent
391330d95f
commit
177e0e15d7
2 changed files with 8 additions and 9 deletions
|
@ -38,16 +38,15 @@ function queue_run($argv, $argc){
|
|||
|
||||
logger('queue: start');
|
||||
|
||||
$interval = intval(get_config('system','delivery_interval'));
|
||||
if(! $interval)
|
||||
$interval = 2;
|
||||
$interval = ((get_config('system','delivery_interval') === false) ? 2 : intval(get_config('system','delivery_interval')));
|
||||
|
||||
$r = q("select * from deliverq where 1");
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
logger('queue: deliverq');
|
||||
proc_run('php','include/delivery.php',$rr['cmd'],$rr['item'],$rr['contact']);
|
||||
@time_sleep_until(microtime(true) + (float) $interval);
|
||||
if($interval)
|
||||
@time_sleep_until(microtime(true) + (float) $interval);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue