Skip to content
Snippets Groups Projects
Commit 398a8bce authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Added reindexing to ScoreCalculator

parent befcf6bd
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,10 @@ class ScoreCalculatorWorker
score = calculator.calculate
object.update_columns(score: score) if score.is_a? Float
if score.is_a? Float
object.update_columns(score: score)
object.reindex(async: true)
end
object.update_columns(user_category_id: calculator.category_by_reputation) if object_class == "User"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment