aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2011-03-16 06:52:33 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2011-03-16 06:52:33 +0100
commitc43f647049c78b594c90e95d06d12f29f300d5d3 (patch)
treea6b02ad763a5d539158721edbe8ca73e158d8ca4 /include/poller.php
parenta2ee5ebe427522228dc03dc81da11f348a399c4d (diff)
parente2ea341094c53e78ae7473a83d2b6c85b1cde4eb (diff)
downloadvolse-hubzilla-c43f647049c78b594c90e95d06d12f29f300d5d3.tar.gz
volse-hubzilla-c43f647049c78b594c90e95d06d12f29f300d5d3.tar.bz2
volse-hubzilla-c43f647049c78b594c90e95d06d12f29f300d5d3.zip
Merge branch 'master' of git://github.com/friendika/friendika
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 a093190a6..8619697d9 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -29,6 +29,17 @@ function poller_run($argv, $argc){
proc_run('php',"include/queue.php");
+ // once daily run expire in background
+
+ $d1 = get_config('system','last_expire_day');
+ $d2 = intval(datetime_convert('UTC','UTC','now','d'));
+
+ if($d2 != intval($d1)) {
+ set_config('system','last_expire_day',$d2);
+ proc_run('php','include/expire.php');
+ }
+
+
// clear old cache
q("DELETE FROM `cache` WHERE `updated` < '%s'",
dbesc(datetime_convert('UTC','UTC',"now - 30 days")));