]> git.mxchange.org Git - friendica.git/commitdiff
We can now define the days after a contact is archived
authorMichael <heluecht@pirati.ca>
Tue, 10 Apr 2018 11:10:02 +0000 (11:10 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 10 Apr 2018 11:10:02 +0000 (11:10 +0000)
doc/htconfig.md
src/Model/Contact.php
src/Protocol/Diaspora.php
src/Worker/Queue.php

index 0b9d1cdd2bfeb05e18a5adf5ccc19a3dd8b983c1..977bf1dbcc096be124af8d07d3444e7d2fee1a91 100644 (file)
@@ -25,8 +25,9 @@ Example: To set the automatic database cleanup process add this line to your .ht
 
 * **allowed_link_protocols** (Array) - Allowed protocols in links URLs, add at your own risk. http is always allowed.
 * **always_show_preview** (Boolean) - Only show small preview picures. Default value is false.
-* **block_local_dir** (Boolean) - Blocks the access to the directory of the local users.
+* **archival_days** (Integer) - Number of days that we try to deliver content before we archive a contact. Defaults to 32.
 * **auth_cookie_lifetime** (Integer) - Number of days that should pass without any activity before a user who chose "Remember me" when logging in is considered logged out. Defaults to 7.
+* **block_local_dir** (Boolean) - Blocks the access to the directory of the local users.
 * **config_adapter** (jit|preload) - Allow to switch the configuration adapter to improve performances at the cost of memory consumption. Default value is "jit"
 * **curl_range_bytes** - Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
 * **db_log** - Name of a logfile to log slow database queries
index 60dec8b2891f9b9a532892ecb790355b138ce59c..1354bbdb8997bf2de0e86b1bd435042895e3f03b 100644 (file)
@@ -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
index 79e7c096378a01a056b6297bfeb6bccd42efeaaa..0e5f0c27f1f52d426d5138e483666fe9e212b151 100644 (file)
@@ -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)) {
index 5c8942db2ae039230d4858bf4e683185327337e5..57f6e92774dade5068cc82f46ca9c31fd670a29d 100644 (file)
@@ -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;