Notify example should pop the oldest message in conn.notifies, not the newest.

This commit is contained in:
btubbs 2015-05-21 01:24:00 -06:00 committed by Daniele Varrazzo
parent 526c9ea763
commit fb487ff244

View File

@ -291,7 +291,7 @@ something to read::
else: else:
conn.poll() conn.poll()
while conn.notifies: while conn.notifies:
notify = conn.notifies.pop() notify = conn.notifies.pop(0)
print "Got NOTIFY:", notify.pid, notify.channel, notify.payload print "Got NOTIFY:", notify.pid, notify.channel, notify.payload
Running the script and executing a command such as :sql:`NOTIFY test, 'hello'` Running the script and executing a command such as :sql:`NOTIFY test, 'hello'`