aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Poller.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 /Zotlabs/Daemon/Poller.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 'Zotlabs/Daemon/Poller.php')
-rw-r--r--Zotlabs/Daemon/Poller.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/Zotlabs/Daemon/Poller.php b/Zotlabs/Daemon/Poller.php
index 63c498f17..5bf8d3a02 100644
--- a/Zotlabs/Daemon/Poller.php
+++ b/Zotlabs/Daemon/Poller.php
@@ -17,10 +17,12 @@ class Poller {
}
}
+/*
$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))
@@ -32,6 +34,7 @@ class Poller {
// Create a lockfile. Needs two vars, but $x doesn't need to contain anything.
$x = '';
file_put_contents($lockfile, $x);
+*/
logger('poller: start');
@@ -103,8 +106,10 @@ class Poller {
if ($t < $x) {
Master::Summon(['Onepoll', $contact['abook_id']]);
+ /*
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
+ */
}
continue;
@@ -167,8 +172,11 @@ class Poller {
continue;
Master::Summon(['Onepoll', $contact['abook_id']]);
+
+ /*
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
+ */
}
}
@@ -190,9 +198,13 @@ class Poller {
if ($rr['ud_last'] > NULL_DATE)
if ($rr['ud_last'] > datetime_convert('UTC', 'UTC', 'now - 1 day'))
continue;
+
Master::Summon(['Onedirsync', $rr['ud_id']]);
+
+ /*
if ($interval)
@time_sleep_until(microtime(true) + (float)$interval);
+ */
}
}
}
@@ -200,9 +212,9 @@ class Poller {
set_config('system', 'lastpoll', datetime_convert());
//All done - clear the lockfile
-
+/*
@unlink($lockfile);
-
+*/
return;
}
}