mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Notify example should pop the oldest message in conn.notifies, not the newest.
This commit is contained in:
parent
6002c524d6
commit
06b4b1de94
|
@ -291,7 +291,7 @@ something to read::
|
|||
else:
|
||||
conn.poll()
|
||||
while conn.notifies:
|
||||
notify = conn.notifies.pop()
|
||||
notify = conn.notifies.pop(0)
|
||||
print "Got NOTIFY:", notify.pid, notify.channel, notify.payload
|
||||
|
||||
Running the script and executing a command such as :sql:`NOTIFY test, 'hello'`
|
||||
|
|
Loading…
Reference in New Issue
Block a user