]> git.mxchange.org Git - friendica.git/commitdiff
Option to activate or deactivate the background fetching
authorMichael <heluecht@pirati.ca>
Mon, 1 Aug 2022 06:59:20 +0000 (06:59 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 1 Aug 2022 06:59:20 +0000 (06:59 +0000)
src/Protocol/ActivityPub/Processor.php
static/defaults.config.php

index 6959755a11b31f8d6652648a34a26c75aaabef6e..653649aa2d8d83fce7f3579a4ab9810282e878c7 100644 (file)
@@ -340,7 +340,7 @@ class Processor
                                }
                        }
 
-                       if ($fetch_by_worker) {
+                       if ($fetch_by_worker && DI::config()->get('system', 'fetch_by_worker')) {
                                Logger::notice('Fetching is done by worker.', ['parent' => $activity['reply-to-id'], 'recursion-depth' => $recursion_depth]);
                                $activity['recursion-depth'] = 0;
                                if (!Fetch::hasWorker($activity['reply-to-id'])) {
index 01cd24f04b3a3c9ead7aa2d74f8c30bb9d0867a6..ee15ce826df704b5798275c1ffa716df77ac2c4e 100644 (file)
@@ -282,6 +282,10 @@ return [
                // Priority for the expirary notification 
                'expire-notify-priority' => PRIORITY_LOW,
 
+               // fetch_by_worker (Boolean)
+               // Fetch missing posts via a background process
+               'fetch_by_worker' => false,
+
                // free_crawls (Integer)
                // Number of "free" searches when system => permit_crawling is enabled.
                'free_crawls' => 10,
@@ -421,8 +425,8 @@ return [
                'max_processes_frontend' => 20,
 
                // max_recursion_depth (Integer)
-               // Maximum recursion depth when fetching posts until the job is delegated to a worker task.
-               'max_recursion_depth' => 10,
+               // Maximum recursion depth when fetching posts until the job is delegated to a worker task or finished.
+               'max_recursion_depth' => 50,
 
                // maximagesize (Integer)
                // Maximum size in bytes of an uploaded photo.