Class: Restaurants::ReviewsCountWorker
- Inherits:
-
ApplicationWorker
- Object
- ApplicationWorker
- Restaurants::ReviewsCountWorker
- Defined in:
- app/workers/restaurants/reviews_count_worker.rb
Overview
Worker responsible for updating restaurant review counts after a delay to prevent race conditions and ensure data consistency.
Instance Method Summary collapse
-
#perform(model_class, model_id) ⇒ Object
Update the review count for a restaurant.
Methods inherited from ApplicationWorker
Instance Method Details
#perform(model_class, model_id) ⇒ Object
Update the review count for a restaurant
11 12 13 14 15 |
# File 'app/workers/restaurants/reviews_count_worker.rb', line 11 def perform(model_class, model_id) ElasticAPM.with_span('Restaurant reviews count update', 'app') do Restaurant.update_reviews_count(model_class, model_id) end end |