Sha256: 6b01c368940a9cd6a44736c3cf6c13a6601b2d091341ca02c0ffededb6303e93
Contents?: true
Size: 586 Bytes
Versions: 14
Compression:
Stored size: 586 Bytes
Contents
module Ahoy module Stores class BunnyStore < LogStore def log_visit(data) post(visits_queue, data) end def log_event(data) post(events_queue, data) end def channel @channel ||= begin conn = Bunny.new conn.start conn.create_channel end end def post(queue, message) channel.queue(queue, durable: true).publish(message.to_json) end def visits_queue "ahoy_visits" end def events_queue "ahoy_events" end end end end
Version data entries
14 entries across 14 versions & 1 rubygems