implement a forced directory update mode where we unconditionally create a directory sync packet. This is needed to ensure that monthly directory pings are propagated to other directory servers so they can each prove for themselves whether or not an account is alive or dead. We do not trust other directories to provide us information beyond "look at this entry and decide for yourself" as doing otherwise would invite rogue directory manipulations. As this scheduled update occurs on all channels across all servers, we should also pick up refresh messages from all existing channel clones and these should also propagate out to all directory servers using the same mechanism (though perhaps not at the same time).

This commit is contained in:
friendica
2014-02-11 14:19:20 -08:00
parent 841f3922aa
commit d02529fde1
6 changed files with 33 additions and 19 deletions

View File

@@ -64,7 +64,7 @@ function poller_run($argv, $argc){
$r = q("select channel_id from channel where channel_dirdate < UTC_TIMESTAMP() - INTERVAL 30 DAY");
if($r) {
foreach($r as $rr) {
proc_run('php','include/directory.php',$rr['channel_id'],'ping');
proc_run('php','include/directory.php',$rr['channel_id'],'force');
if($interval)
@time_sleep_until(microtime(true) + (float) $interval);
}