diff options
author | Mario <mario@mariovavti.com> | 2020-11-05 08:46:42 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-11-05 08:46:42 +0000 |
commit | bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch) | |
tree | 8929845be585b09d0f420621281c5531e1efad3e /Zotlabs/Daemon/Cron.php | |
parent | 6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff) | |
parent | fdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff) | |
download | volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.gz volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.bz2 volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.zip |
Merge branch '5.0RC'5.0
Diffstat (limited to 'Zotlabs/Daemon/Cron.php')
-rw-r--r-- | Zotlabs/Daemon/Cron.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index 8fa31e6ce..703d6ce08 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -2,6 +2,8 @@ namespace Zotlabs\Daemon; +use Zotlabs\Lib\Libsync; + class Cron { static public function run($argc,$argv) { @@ -36,10 +38,14 @@ class Cron { Master::Summon(array('Poller')); - // maintenance for mod sharedwithme - check for updated items and remove them - - require_once('include/sharedwithme.php'); - apply_updates(); + /** + * Chatpresence: if somebody hasn't pinged recently, they've most likely left the page + * and shouldn't count as online anymore. We allow an expection for bots. + */ + q("delete from chatpresence where cp_last < %s - INTERVAL %s and cp_client != 'auto' ", + db_utcnow(), + db_quoteinterval('3 MINUTE') + ); // expire any expired mail @@ -138,7 +144,7 @@ class Cron { if($z) { xchan_query($z); $sync_item = fetch_post_tags($z); - build_sync_packet($sync_item[0]['uid'], + Libsync::build_sync_packet($sync_item[0]['uid'], [ 'item' => [ encode_item($sync_item[0],true) ] ] @@ -149,6 +155,11 @@ class Cron { } } + + // check if any connections transitioned to zot6 and upgrade the connections to zot6 at this hub if so. + require_once('include/connections.php'); + z6trans_connections(); + require_once('include/attach.php'); attach_upgrade(); |