Class: Vendors::SevenRooms::RestaurantInventorySyncWorker
- Inherits:
-
ApplicationWorker
- Object
- ApplicationWorker
- Vendors::SevenRooms::RestaurantInventorySyncWorker
- Defined in:
- app/workers/vendors/seven_rooms/restaurant_inventory_sync_worker.rb
Overview
Sidekiq worker for syncing sevenrooms restaurant inventory.
This worker delegates all business logic to VendorsService::InventorySync::RestaurantService, passing the supplier as 'sevenrooms'. It sets business context for logging and triggers the service.
All inventory sync logic, error handling, and instrumentation are handled in the service.
Instance Method Summary collapse
-
#perform(restaurant_id, start_date, end_date = start_date) ⇒ Boolean
Performs inventory sync for a sevenrooms restaurant.
Instance Method Details
#perform(restaurant_id, start_date, end_date = start_date) ⇒ Boolean
Performs inventory sync for a sevenrooms restaurant
30 31 32 33 34 35 36 37 |
# File 'app/workers/vendors/seven_rooms/restaurant_inventory_sync_worker.rb', line 30 def perform(restaurant_id, start_date, end_date = start_date) VendorsService::InventorySync::RestaurantService.new( restaurant_id: restaurant_id, start_date: start_date, end_date: end_date, supplier: :sevenrooms, ).call end |