Sha256: f9789662eccf0bb5c27aaff43aabf91ad1090af6cfc2efc3645b388f37d175bf
Contents?: true
Size: 459 Bytes
Versions: 1
Compression:
Stored size: 459 Bytes
Contents
module CelluloidIOPGListener # An example Client class class Listener include CelluloidIOPGListener::Client def initialize(dbname:, channel:) info "Client will for notifications on #{dbname}:#{channel}" @dbname = dbname async.start_listening async.listen(channel, :do_something) end def do_something(channel, payload) unlisten_wrapper(channel, payload) do info payload end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
celluloid-io-pg-listener-0.1.0 | lib/celluloid-io-pg-listener/listener.rb |