public inbox for [email protected]  
help / color / mirror / Atom feed
Async notifications in psycopg3
2+ messages / 2 participants
[nested] [flat]

* Async notifications in psycopg3
@ 2020-05-26 13:22 Daniele Varrazzo <[email protected]>
  2020-05-28 16:47 ` Re: Async notifications in psycopg3 Adrian Klaver <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Daniele Varrazzo @ 2020-05-26 13:22 UTC (permalink / raw)
  To: psycopg

Hello,

I have introduced async notifications handling for psycopg3. At the
moment it comes in the form of a generator (eventually async - in
asyncio sense) so that they can be used as simply as:

    for notify in conn.notifies():
        # ... process

but notifies may be also received during the normal query processing,
for which a possible way to receive them can is a callback.

I am not entirely convinced about the design so I'd be happy to
receive some feedback by anyone who has ideas about how they would use
the features. There is a more complete description and references in
<https://github.com/psycopg/psycopg3/issues/5;: happy to have a
conversation either here or on the github ticket.

Cheers,

-- Daniele





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Async notifications in psycopg3
  2020-05-26 13:22 Async notifications in psycopg3 Daniele Varrazzo <[email protected]>
@ 2020-05-28 16:47 ` Adrian Klaver <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Adrian Klaver @ 2020-05-28 16:47 UTC (permalink / raw)
  To: Daniele Varrazzo <[email protected]>; psycopg

On 5/26/20 6:22 AM, Daniele Varrazzo wrote:
> Hello,
> 
> I have introduced async notifications handling for psycopg3. At the
> moment it comes in the form of a generator (eventually async - in
> asyncio sense) so that they can be used as simply as:
> 
>      for notify in conn.notifies():
>          # ... process
> 
> but notifies may be also received during the normal query processing,
> for which a possible way to receive them can is a callback.
> 
> I am not entirely convinced about the design so I'd be happy to
> receive some feedback by anyone who has ideas about how they would use
> the features. There is a more complete description and references in
> <https://github.com/psycopg/psycopg3/issues/5;: happy to have a
> conversation either here or on the github ticket.

When I get a chance I will take a look.
> 
> Cheers,
> 
> -- Daniele
> 
> 


-- 
Adrian Klaver
[email protected]





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-05-28 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 13:22 Async notifications in psycopg3 Daniele Varrazzo <[email protected]>
2020-05-28 16:47 ` Adrian Klaver <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox