4 ms·
Interesting! I wonder if you could use this in a Django project with Channels, and stream database changes over websocket to the client. I think I've found a pr
by zach_garwood 6y ago
Interesting! I wonder if you could use this in a Django project with Channels, and stream database changes over websocket to the client. I think I've found a project for this weekend!
I must admit my DB knowledge is lacking. What is the purpose of setting the isolation level to autocommit?
- kissgyorgy 6y ago> I wonder if you could use this in a Django project with Channels, and stream database changes over websocket to the client.I wonder if you could use this in a Django project with Channels, and stream database changes over websocket to the client. That's exactly what I'm doing with this! :) But you don't even need channels for that! The point is to simplify the stack. > What is the purpose of setting the isolation level to autocommit? Notifications are only sent after a transaction has been committed, see: https://www.postgresql.org/docs/12/sql-listen.html https://www.postgresql.org/docs/12/sql-listen.html Here is an example in the psycopg2 documentation: https://www.psycopg.org/docs/advanced.html#asynchronous-notifications https://www.psycopg.org/docs/advanced.html#asynchronous-noti...
- vladsanchez 6y agoYes you can. I used this same technique a long time ago, for cache-invalidation.