aboutsummaryrefslogtreecommitdiffstats
path: root/include/hubloc.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-12-12 23:26:45 +0100
committerMario Vavti <mario@mariovavti.com>2022-12-12 23:26:45 +0100
commitc9e170dfcc83a946fda7d4335c136ed40b3c579d (patch)
tree52ee00eefa5ab9f660f3dbf1135b33a11e1cb295 /include/hubloc.php
parente3a19469eb6940249ad87662399d14dbf2a79847 (diff)
downloadvolse-hubzilla-c9e170dfcc83a946fda7d4335c136ed40b3c579d.tar.gz
volse-hubzilla-c9e170dfcc83a946fda7d4335c136ed40b3c579d.tar.bz2
volse-hubzilla-c9e170dfcc83a946fda7d4335c136ed40b3c579d.zip
queueworker: introduce new interval config queueworker.queue_interval - defaults to 500000 microseconds. No config UI yet.
Diffstat (limited to 'include/hubloc.php')
-rw-r--r--include/hubloc.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/hubloc.php b/include/hubloc.php
index edd452dd3..965725cba 100644
--- a/include/hubloc.php
+++ b/include/hubloc.php
@@ -155,8 +155,7 @@ function remove_obsolete_hublocs() {
logger('remove_obsolete_hublocs: removing ' . count($r) . ' hublocs.');
- $interval = ((get_config('system', 'delivery_interval') !== false)
- ? intval(get_config('system', 'delivery_interval')) : 2 );
+ $interval = get_config('queueworker', 'queue_interval', 500000);
foreach($r as $rr) {
q("update hubloc set hubloc_deleted = 1 where hubloc_id = %d",
@@ -170,7 +169,7 @@ function remove_obsolete_hublocs() {
Master::Summon(array('Notifier', 'refresh_all', $x[0]['channel_id']));
if($interval) {
- @time_sleep_until(microtime(true) + (float) $interval);
+ usleep($interval);
}
}
}