Class: ReportReservationDataWorker
- Inherits:
-
ApplicationWorker
- Object
- ApplicationWorker
- ReportReservationDataWorker
- Defined in:
- app/workers/report_reservation_data_worker.rb
Overview
operation class to give reward to user based on reservation id
Instance Method Summary collapse
Methods inherited from ApplicationWorker
Instance Method Details
#perform(reservation_id) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/workers/report_reservation_data_worker.rb', line 6 def perform(reservation_id) @reservation = Reservation.fetch reservation_id return false unless reservation.present? && reservation.reached_goal? @restaurant = Restaurant.fetch reservation.restaurant_id store_last_24h_created store_last_7d_created true end |