-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support LISTEN/NOTIFY callback handlers #117
Comments
Thanks for the feature request, we'll implement it. |
@oliverlambson Hello! If it's possible could you please describe how you usually use this functionality? |
I use it to send notifications like events that a listener can then react to. Being able to do that means I can implement an asynchronous message queue. I've implemented it from scratch in https://www.github.com/oliverlambson/pgmq (there are explanations there if it's helpful), and as a taskiq plugin https://www.github.com/karoo-ca/taskiq-pg |
Okay, thank you very much I've started implementing it but it'll be different in API from asyncpg. |
Exciting! |
@oliverlambson Hello! I've made a new release 0.9.0 with support for LISTEN functionality. It's the first variant of API, so if you have any ideas on how to make it better, please let me know. |
I'd like to be able to add a callback handler similar to asyncpg's
connection.add_listener(...)
I'm agnostic on the API, if there is a more idiomatic PSQLPy abstraction or interface that's cool—I just think it would be great to have the LISTEN/NOTIFY functionality exposed
The text was updated successfully, but these errors were encountered: