Merge pull request #4807 from annando/archival-days
We can now define the days after a contact is archived
This commit is contained in:
commit
9d5abaca1c
4 changed files with 10 additions and 7 deletions
|
|
@ -306,7 +306,9 @@ class Contact extends BaseObject
|
|||
*/
|
||||
|
||||
/// @todo Check for contact vitality via probing
|
||||
$expiry = $contact['term-date'] . ' + 32 days ';
|
||||
$archival_days = Config::get('system', 'archival_days', 32);
|
||||
|
||||
$expiry = $contact['term-date'] . ' + ' . $archival_days . ' days ';
|
||||
if (DateTimeFormat::utcNow() > DateTimeFormat::utc($expiry)) {
|
||||
/* Relationship is really truly dead. archive them rather than
|
||||
* delete, though if the owner tries to unarchive them we'll start
|
||||
|
|
|
|||
|
|
@ -3319,7 +3319,7 @@ class Diaspora
|
|||
}
|
||||
}
|
||||
|
||||
logger("transmit: ".$logid."-".$guid." returns: ".$return_code);
|
||||
logger("transmit: ".$logid."-".$guid." to ".$dest_url." returns: ".$return_code);
|
||||
|
||||
if (!$return_code || (($return_code == 503) && (stristr($a->get_curl_headers(), "retry-after")))) {
|
||||
if (!$no_queue && ($contact['contact-type'] != ACCOUNT_TYPE_RELAY)) {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class Queue
|
|||
logger("Check server " . $server . " (" . $contact["network"] . ")");
|
||||
|
||||
$vital = PortableContact::checkServer($server, $contact["network"], true);
|
||||
Cache::set($cachekey_server . $server, $vital, CACHE_QUARTER_HOUR);
|
||||
Cache::set($cachekey_server . $server, $vital, CACHE_MINUTE);
|
||||
}
|
||||
|
||||
if (!is_null($vital) && !$vital) {
|
||||
|
|
@ -118,7 +118,7 @@ class Queue
|
|||
QueueModel::removeItem($q_item['id']);
|
||||
} else {
|
||||
QueueModel::updateTime($q_item['id']);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_MINUTE);
|
||||
}
|
||||
break;
|
||||
case NETWORK_OSTATUS:
|
||||
|
|
@ -127,7 +127,7 @@ class Queue
|
|||
|
||||
if ($deliver_status == -1) {
|
||||
QueueModel::updateTime($q_item['id']);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_MINUTE);
|
||||
} else {
|
||||
QueueModel::removeItem($q_item['id']);
|
||||
}
|
||||
|
|
@ -141,7 +141,7 @@ class Queue
|
|||
QueueModel::removeItem($q_item['id']);
|
||||
} else {
|
||||
QueueModel::updateTime($q_item['id']);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_MINUTE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue