mirror of https://github.com/FreshRSS/FreshRSS.git
System option for number of feeds to refresh in parallel (#6124)
* System option for number of feeds to refresh in parallel fix https://github.com/FreshRSS/FreshRSS/issues/6123 * Forgot refreshDynamicOpml
This commit is contained in:
parent
bfd277065c
commit
bdf899164b
|
@ -20,6 +20,7 @@ declare(strict_types=1);
|
||||||
* @property array<string,int> $limits
|
* @property array<string,int> $limits
|
||||||
* @property-read string $logo_html
|
* @property-read string $logo_html
|
||||||
* @property-read string $meta_description
|
* @property-read string $meta_description
|
||||||
|
* @property-read int $nb_parallel_refresh
|
||||||
* @property-read bool $pubsubhubbub_enabled
|
* @property-read bool $pubsubhubbub_enabled
|
||||||
* @property-read string $salt
|
* @property-read string $salt
|
||||||
* @property-read bool $simplepie_syslog_enabled
|
* @property-read bool $simplepie_syslog_enabled
|
||||||
|
|
|
@ -17,6 +17,7 @@ echo htmlspecialchars(json_encode(array(
|
||||||
'auto_mark_focus' => !!$mark['focus'],
|
'auto_mark_focus' => !!$mark['focus'],
|
||||||
'auto_load_more' => !!FreshRSS_Context::userConf()->auto_load_more,
|
'auto_load_more' => !!FreshRSS_Context::userConf()->auto_load_more,
|
||||||
'auto_actualize_feeds' => Minz_Session::paramBoolean('actualize_feeds'),
|
'auto_actualize_feeds' => Minz_Session::paramBoolean('actualize_feeds'),
|
||||||
|
'nb_parallel_refresh' => max(1, FreshRSS_Context::systemConf()->nb_parallel_refresh),
|
||||||
'does_lazyload' => !!FreshRSS_Context::userConf()->lazyload ,
|
'does_lazyload' => !!FreshRSS_Context::userConf()->lazyload ,
|
||||||
'sides_close_article' => !!FreshRSS_Context::userConf()->sides_close_article,
|
'sides_close_article' => !!FreshRSS_Context::userConf()->sides_close_article,
|
||||||
'sticky_post' => !!FreshRSS_Context::isStickyPostEnabled(),
|
'sticky_post' => !!FreshRSS_Context::isStickyPostEnabled(),
|
||||||
|
|
|
@ -92,6 +92,10 @@ return array(
|
||||||
# If true does nothing, if false restricts HTTP Referer via: meta referrer origin
|
# If true does nothing, if false restricts HTTP Referer via: meta referrer origin
|
||||||
'allow_referrer' => false,
|
'allow_referrer' => false,
|
||||||
|
|
||||||
|
# Number of feeds to refresh in parallel from the Web user interface.
|
||||||
|
# Faster with higher values. Reduce for server with little memory or database issues.
|
||||||
|
'nb_parallel_refresh' => 10,
|
||||||
|
|
||||||
'limits' => array(
|
'limits' => array(
|
||||||
|
|
||||||
# Duration in seconds of the login cookie.
|
# Duration in seconds of the login cookie.
|
||||||
|
|
|
@ -1448,7 +1448,7 @@ function refreshFeeds(json) {
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
const feeds_count = json.feeds.length;
|
const feeds_count = json.feeds.length;
|
||||||
for (let i = 10; i > 0; i--) {
|
for (let i = context.nb_parallel_refresh; i > 0; i--) {
|
||||||
refreshFeed(json.feeds, feeds_count);
|
refreshFeed(json.feeds, feeds_count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1487,7 +1487,7 @@ function refreshDynamicOpmls(json, next) {
|
||||||
categories_processed = 0;
|
categories_processed = 0;
|
||||||
if (json.categories && json.categories.length > 0) {
|
if (json.categories && json.categories.length > 0) {
|
||||||
const categories_count = json.categories.length;
|
const categories_count = json.categories.length;
|
||||||
for (let i = 10; i > 0; i--) {
|
for (let i = context.nb_parallel_refresh; i > 0; i--) {
|
||||||
refreshDynamicOpml(json.categories, categories_count, next);
|
refreshDynamicOpml(json.categories, categories_count, next);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue