aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Cron_weekly.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-14 14:50:36 -0800
committerzotlabs <mike@macgirvin.com>2017-11-14 14:50:36 -0800
commitd43542dd7a64136626550ba0569b1939b84b8146 (patch)
treef19c6f9716fcc9fe72e573d778bb45eb1c397051 /Zotlabs/Daemon/Cron_weekly.php
parent59caf141d1e271ee4a6e7ab8b66f4070835dde95 (diff)
parent3c3c0ed34269cecdbda1288eab5b63c664a8859c (diff)
downloadvolse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.tar.gz
volse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.tar.bz2
volse-hubzilla-d43542dd7a64136626550ba0569b1939b84b8146.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Daemon/Cron_weekly.php')
-rw-r--r--Zotlabs/Daemon/Cron_weekly.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Cron_weekly.php b/Zotlabs/Daemon/Cron_weekly.php
index 5b185f475..d44400767 100644
--- a/Zotlabs/Daemon/Cron_weekly.php
+++ b/Zotlabs/Daemon/Cron_weekly.php
@@ -21,6 +21,21 @@ class Cron_weekly {
mark_orphan_hubsxchans();
+ // Find channels that were removed in the last three weeks, but
+ // haven't been finally cleaned up. These should be older than 10
+ // days to ensure that "purgeall" messages have gone out or bounced
+ // or timed out.
+
+ $r = q("select channel_id from channel where channel_removed = 1 and
+ channel_deleted > %s - INTERVAL %s and channel_deleted < %s - INTERVAL %s",
+ db_utcnow(), db_quoteinterval('21 DAY'),
+ db_utcnow(), db_quoteinterval('10 DAY')
+ );
+ if($r) {
+ foreach($r as $rv) {
+ channel_remove_final($rv['channel_id']);
+ }
+ }
// get rid of really old poco records