From 2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 2 Dec 2022 19:22:19 +0000 Subject: move queueworker to core and bump version --- Zotlabs/Daemon/Poller.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Daemon/Poller.php') 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; } } -- cgit v1.2.3