aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Poller.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 /Zotlabs/Daemon/Poller.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 'Zotlabs/Daemon/Poller.php')
-rw-r--r--Zotlabs/Daemon/Poller.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/Zotlabs/Daemon/Poller.php b/Zotlabs/Daemon/Poller.php
index b43b814f7..0fdc3da16 100644
--- a/Zotlabs/Daemon/Poller.php
+++ b/Zotlabs/Daemon/Poller.php
@@ -17,13 +17,13 @@ class Poller {
}
}
+ $interval = get_config('queueworker', 'queue_interval', 500000);
- $interval = intval(get_config('system', 'poll_interval'));
+/*
if (!$interval) {
$interval = ((get_config('system', 'delivery_interval') === false) ? 3 : intval(get_config('system', 'delivery_interval')));
}
-/*
// Check for a lockfile. If it exists, but is over an hour old, it's stale. Ignore it.
$lockfile = 'store/[data]/poller';
if ((file_exists($lockfile)) && (filemtime($lockfile) > (time() - 3600))
@@ -109,7 +109,7 @@ class Poller {
Master::Summon(['Onepoll', $contact['abook_id']]);
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
@@ -175,7 +175,7 @@ class Poller {
Master::Summon(['Onepoll', $contact['abook_id']]);
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
}
@@ -201,7 +201,7 @@ class Poller {
Master::Summon(['Onedirsync', $rr['ud_id']]);
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
}