lib/rising_dragon/sqs/emitter.rb in rising_dragon-0.4.0 vs lib/rising_dragon/sqs/emitter.rb in rising_dragon-0.5.0

- old
+ new

@@ -42,22 +42,22 @@ handler.new.handle(event) nil end - def event_from_json(sqs_msg, body) + def event_from_json(body) msg = JSON.parse(body['Message']) id = msg['id'] type = msg['type'] timestamp = Time.at(msg['timestamp'] / 1000.0) data = msg['data'] - ::RisingDragon::Event.new(id: id, type: type, timestamp: timestamp, data: data, sqs_msg: sqs_msg) + ::RisingDragon::Event.new(id: id, type: type, timestamp: timestamp, data: data) end - def emit_sqs_msg(sqs_msg, body) - event = event_from_json(sqs_msg, body) + def emit_sns_msg(body) + event = event_from_json(body) emit_event(event) end end end end