correct retry logic
This commit is contained in:
parent
6451495ec6
commit
84fdc655ad
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue