correct retry logic

This commit is contained in:
Sam 2015-08-24 10:28:38 +10:00
parent 6451495ec6
commit 84fdc655ad
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ class User < ActiveRecord::Base
create_visit_record!(now.to_date, posts_read: num_posts, mobile: opts.fetch(:mobile, false)) create_visit_record!(now.to_date, posts_read: num_posts, mobile: opts.fetch(:mobile, false))
rescue ActiveRecord::RecordNotUnique rescue ActiveRecord::RecordNotUnique
if !_retry if !_retry
update_posts_read!(num_posts, now, _retry=true) update_posts_read!(num_posts, opts.merge( retry: true ))
else else
raise raise
end end