aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-22 02:32:04 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-22 02:32:04 -0700
commit0b1b11ea53ee3fd466eb338ac5ce67e62af87413 (patch)
tree7bdda0d64e1bf27f860af620dcab160c470664cc /include/poller.php
parent146ff6f70308647b27374a1bba386c156498bd2e (diff)
downloadvolse-hubzilla-0b1b11ea53ee3fd466eb338ac5ce67e62af87413.tar.gz
volse-hubzilla-0b1b11ea53ee3fd466eb338ac5ce67e62af87413.tar.bz2
volse-hubzilla-0b1b11ea53ee3fd466eb338ac5ce67e62af87413.zip
heavy lifting for delivery reports
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/poller.php b/include/poller.php
index 72f22d946..031fb4533 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -201,6 +201,17 @@ function poller_run($argv, $argc){
db_utcnow(), db_quoteinterval('30 DAY')
);
+ // expire old delivery reports
+
+ $keep_reports = intval(get_config('system','expire_delivery_reports'));
+ if($keep_reports === 0)
+ $keep_reports = 30;
+
+ q("delete from dreport where dreport_time < %s - INTERVAL %s",
+ db_utcnow(),
+ db_quoteinterval($keep_reports . ' DAY')
+ );
+
// expire any expired accounts
downgrade_accounts();