Permalink
Browse files

Actually iterate over users when doing periodic fetch

  • Loading branch information...
rwdaigle committed Oct 5, 2012
1 parent 4deedc3 commit 3ff63398438d3e04254627cc060055c8983878a3
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/gist_fetcher.rb
@@ -6,7 +6,7 @@ def fetch
period = ENV['FETCH_INTERVAL_MINS'] ? ENV['FETCH_INTERVAL_MINS'].to_i : 1440
since = period.minutes.ago
log({ns: self, fn: __method__}, since: since) do
- User.last_fetched_before(since).pluck(:id) do |user_id|
+ User.last_fetched_before(since).pluck(:id).each do |user_id|
fetch_user(user_id)
end
end

0 comments on commit 3ff6339

Please sign in to comment.