Class: GroupLandingPages::ClearUiCacheWorker
- Inherits:
-
ApplicationWorker
- Object
- ApplicationWorker
- GroupLandingPages::ClearUiCacheWorker
- Defined in:
- app/workers/group_landing_pages/clear_ui_cache_worker.rb
Overview
Worker to clear UI cache by resending restaurant ranks to search service. Processes all restaurant ranks associated with a group landing page.
Instance Method Summary collapse
Methods inherited from ApplicationWorker
Instance Method Details
#perform(group_landing_page_id) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/workers/group_landing_pages/clear_ui_cache_worker.rb', line 15 def perform(group_landing_page_id) group_landing_page = GroupLandingPage.find_by(id: group_landing_page_id) return unless group_landing_page restaurant_ids = collect_restaurant_ids(group_landing_page) resend_restaurant_events(restaurant_ids, group_landing_page_id) rescue StandardError => e APMErrorHandler.report(e, context: { worker: 'GroupLandingPages::ClearUiCacheWorker', group_landing_page_id: group_landing_page_id, }) raise end |