LISTEN/NOTIFY and python - Mailing list pgsql-general

From John D. Burger
Subject LISTEN/NOTIFY and python
Date
Msg-id 220696A9-B535-4F9F-97E9-17D78DC3DD2F@mitre.org
Whole thread Raw
Responses Re: LISTEN/NOTIFY and python  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi -

Does anyone have any suggestions for how to write client python code
that uses LISTEN?  The only thing I can find is the older PyGreSQL
module (import pg), which has getnotify(), but this seems to require
busy-waiting.  Is there any way to do this that will use select() or
something under the covers, so my client doesn't spin up the cpu?
(Yes, I know I could poll-sleep-poll-sleep - that's what I'll do if
there's nothing cleaner.)

- John D. Burger
   MITRE



pgsql-general by date:

Previous
From: Vivek Khera
Date:
Subject: Re: cache - timing
Next
From: Tom Lane
Date:
Subject: Re: Unable to start postgres in recovery mode.