diff options
author | Mario <mario@mariovavti.com> | 2019-11-28 08:22:53 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-28 08:22:53 +0000 |
commit | 2b08519f5ad2cf7803736b42159f92f754acb0bd (patch) | |
tree | d496894f37f05e0ef8d09b4c084a4e2cb75f7363 /Zotlabs/Daemon/Cron.php | |
parent | fcb065bcb2f8e61d1d9e804f8f251967732ee037 (diff) | |
download | volse-hubzilla-2b08519f5ad2cf7803736b42159f92f754acb0bd.tar.gz volse-hubzilla-2b08519f5ad2cf7803736b42159f92f754acb0bd.tar.bz2 volse-hubzilla-2b08519f5ad2cf7803736b42159f92f754acb0bd.zip |
sse: improve caching fix an issue with removing notifications and move chatpresence expiration to cron
Diffstat (limited to 'Zotlabs/Daemon/Cron.php')
-rw-r--r-- | Zotlabs/Daemon/Cron.php | 9 |
1 files changed, 9 insertions, 0 deletions
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 |