Class: PartyLocationHandler
- Inherits:
-
Object
- Object
- PartyLocationHandler
- Defined in:
- app/subscribers/party_location_handler.rb
Overview
Pub/sub subscriber: party location handler.
Instance Method Summary collapse
Instance Method Details
#call(event) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/subscribers/party_location_handler.rb', line 5 def call(event) party = Party.find_by(id: event.data[:party_id]) return unless party context = Campaign::DripContext.new( party:, latitude: event.data[:latitude], longitude: event.data[:longitude] ) Campaign::AssignDripCampaigns.new.process(context) end |