aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/poller.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/poller.php b/include/poller.php
index f75ba2f22..ce9b75eb3 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -47,6 +47,8 @@ function poller_run($argv, $argc){
q("delete from mail where expires != '0000-00-00 00:00:00' and expires < UTC_TIMESTAMP() ");
+ // expire any expired items
+
$r = q("select id from item where expires != '0000-00-00 00:00:00' and expires < UTC_TIMESTAMP()
and not ( item_restrict & %d ) ",
intval(ITEM_DELETED)
@@ -57,9 +59,6 @@ function poller_run($argv, $argc){
drop_item($rr['id'],false);
}
- // expire any read notifications over a month old
-
- q("delete from notify where seen = 1 and date < UTC_TIMESTAMP() - INTERVAL 30 DAY");
// Ensure that every channel pings a directory server once a month. This way we can discover
// channels and sites that quietly vanished and prevent the directory from accumulating stale
@@ -107,8 +106,16 @@ function poller_run($argv, $argc){
$dirmode = get_config('system','directory_mode');
+
+ // Actions in the following block are executed once per day, not on every poller run
+
if($d2 != intval($d1)) {
+ // expire any read notifications over a month old
+
+ q("delete from notify where seen = 1 and date < UTC_TIMESTAMP() - INTERVAL 30 DAY");
+
+
// If this is a directory server, request a sync with an upstream
// directory at least once a day, up to once every poll interval.
// Pull remote changes and push local changes.
@@ -119,14 +126,8 @@ function poller_run($argv, $argc){
sync_directories($dirmode);
}
-
set_config('system','last_expire_day',$d2);
-// Uncomment when expire protocol component is working
-// Update - this is not going to happen. We are only going to
-// implement per-item expire, not blanket expiration
-// proc_run('php','include/expire.php');
-
proc_run('php','include/cli_suggest.php');
}