Merge pull-request #603

This commit is contained in:
Frederic Guillot 2017-01-09 17:29:30 -05:00
commit bef6e1032e
1 changed files with 4 additions and 2 deletions

View File

@ -29,10 +29,12 @@ $call_interval = get_cli_option('call-interval', $options);
foreach (Model\User\get_all_users() as $user) {
if ($update_interval !== null && $call_interval !== null && $limit === null && $update_interval >= $call_interval) {
$feeds_count = Model\Feed\count_feeds($user['id']);
$limit = ceil($feeds_count / ($update_interval / $call_interval));
$current_limit = ceil($feeds_count / ($update_interval / $call_interval));
} else {
$current_limit = $limit;
}
Handler\Feed\update_feeds($user['id'], $limit);
Handler\Feed\update_feeds($user['id'], $current_limit);
Model\Item\autoflush_read($user['id']);
Model\Item\autoflush_unread($user['id']);
Miniflux\Helper\write_debug_file();