Skip to content

Commit

Permalink
Merge pull-request #603
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Jan 9, 2017
2 parents 86d7fdc + b8a9b6f commit bef6e10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cronjob.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
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();
Expand Down

0 comments on commit bef6e10

Please sign in to comment.