From 2b08519f5ad2cf7803736b42159f92f754acb0bd Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 28 Nov 2019 08:22:53 +0000 Subject: sse: improve caching fix an issue with removing notifications and move chatpresence expiration to cron --- Zotlabs/Daemon/Cron.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Zotlabs/Daemon/Cron.php') diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index 8fa31e6ce..bd4e0b294 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -40,6 +40,15 @@ class Cron { 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 -- cgit v1.2.3 From 328685d2fbe505fd5b1bf9892a0cce993210ac52 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 9 Apr 2020 09:38:36 +0000 Subject: move from build_sync_packet() to Libsync::build_sync_packet() --- Zotlabs/Daemon/Cron.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Daemon/Cron.php') diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index bd4e0b294..9cdfa9a0f 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) { @@ -147,7 +149,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) ] ] -- cgit v1.2.3 From e2b10f52e02c4cee77af089a544ec55e62048aba Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 24 Apr 2020 14:25:49 +0000 Subject: more work on deprecating ACTIVITY_OBJ_FILE and adapt mod sharedwithme --- Zotlabs/Daemon/Cron.php | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Zotlabs/Daemon/Cron.php') diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index 9cdfa9a0f..46f4e4071 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -38,11 +38,6 @@ 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. -- cgit v1.2.3 From 1b161b0ee4d16711dc6540b14f50f20b68a7b565 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 26 Aug 2020 21:13:32 +0200 Subject: move z6trans_connections() to cron from cron daily --- Zotlabs/Daemon/Cron.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Zotlabs/Daemon/Cron.php') diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index 46f4e4071..703d6ce08 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -155,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(); -- cgit v1.2.3