aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-12-02 19:22:19 +0000
committerMario <mario@mariovavti.com>2022-12-02 19:22:19 +0000
commit2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0 (patch)
tree1e85f560122aae0b30dfe5a55c3de90fbce64ed1 /include/network.php
parentd16b6c3838cd76eb7ce336444cbd37774857b64f (diff)
downloadvolse-hubzilla-2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0.tar.gz
volse-hubzilla-2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0.tar.bz2
volse-hubzilla-2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0.zip
move queueworker to core and bump version
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/network.php b/include/network.php
index 36859bc2f..7deffe06c 100644
--- a/include/network.php
+++ b/include/network.php
@@ -1467,7 +1467,7 @@ function do_delivery($deliveries, $force = false) {
if(! (is_array($deliveries) && count($deliveries)))
return;
-
+ /*
$x = q("select count(outq_hash) as total from outq where outq_delivered = 0");
if(intval($x[0]['total']) > intval(get_config('system','force_queue_threshold',3000)) && (! $force)) {
logger('immediate delivery deferred.', LOGGER_DEBUG, LOG_INFO);
@@ -1478,8 +1478,10 @@ function do_delivery($deliveries, $force = false) {
}
+
$interval = ((get_config('system','delivery_interval') !== false)
? intval(get_config('system','delivery_interval')) : 2 );
+ */
$deliveries_per_process = intval(get_config('system','delivery_batch_count'));
@@ -1487,7 +1489,7 @@ function do_delivery($deliveries, $force = false) {
$deliveries_per_process = 1;
- $deliver = array();
+ $deliver = [];
foreach($deliveries as $d) {
if(! $d)
@@ -1496,17 +1498,20 @@ function do_delivery($deliveries, $force = false) {
$deliver[] = $d;
if(count($deliver) >= $deliveries_per_process) {
- Zotlabs\Daemon\Master::Summon(array('Deliver',$deliver));
- $deliver = array();
+ Zotlabs\Daemon\Master::Summon(['Deliver', $deliver]);
+ $deliver = [];
+ /*
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);
+ */
}
}
// catch any stragglers
- if($deliver)
- Zotlabs\Daemon\Master::Summon(array('Deliver',$deliver));
+ if($deliver) {
+ Zotlabs\Daemon\Master::Summon(['Deliver', $deliver]);
+ }
}