Class: GeoblacklightMessaging::GeoblacklightEventHandler

Inherits:
Object
  • Object
show all
Includes:
Sneakers::Worker
Defined in:
app/workers/geoblacklight_messaging/geoblacklight_event_handler.rb

Instance Method Summary collapse

Instance Method Details

#work(msg) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'app/workers/geoblacklight_messaging/geoblacklight_event_handler.rb', line 6

def work(msg)
  msg = JSON.parse(msg)
  result = GeoblacklightMessaging::GeoblacklightEventProcessor.new(msg).process
  if result
    ack!
  else
    reject!
  end
end