Feature request #21391

QgsProject Notify/Listen

Added by Raul Sangonzalo over 4 years ago.

Category:Data Provider/PostGIS
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:29208


At the moment, the only way to "LISTEN" to postgres database is through QgsProvider or QgsMapLayer. This inevitably needs to target a layer. It would be nice if the project itself (QgsProject) could be set up to listen to postgres and its respective signals.

The reason behind is that I have several plugins with different tables (task allocation, chat, notifications) with loaded layers (with set notify, refresh and repaintRequested) and signals, that leaves me with 3 permanent established connections to postgres.

The only solution I can think of at the moment is to create a single table that stores my notify signals in postgres and use it to spread the signals in Qgis. However, this is a dodgy solution, so having the project to listen would open up a new world of possibilities, in my opinion.

Also, the class QgsMapLayer contains 3 typos("Nofify"? -> setRefreshOnNofifyMessage, mIsRefreshOnNofifyEnabled, mRefreshOnNofifyMessage

Many thanks.

Also available in: Atom PDF