From 06b4b1de94a1ae9365b94069f7680f87e5e9b87b Mon Sep 17 00:00:00 2001 From: btubbs Date: Thu, 21 May 2015 01:24:00 -0600 Subject: [PATCH] Notify example should pop the oldest message in conn.notifies, not the newest. --- doc/src/advanced.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/advanced.rst b/doc/src/advanced.rst index f0483cea..82754ee0 100644 --- a/doc/src/advanced.rst +++ b/doc/src/advanced.rst @@ -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'`