Skip to content

Commit

Permalink
Send emails in order
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Qian committed Sep 3, 2016
1 parent b00e275 commit b21fe43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def self.send_all(from_id=0)
latest_diff = response[:latest_diff]
start_date = response[:start_date]
end_date = response[:end_date]
User.where("id >= ?", from_id).each do |u|
User.where("id >= ?", from_id).order(id: :asc).each do |u|
next unless u.verified and u.subscribed

sleep(10)
Expand Down

0 comments on commit b21fe43

Please sign in to comment.