nsg-ethz / autopower

A software suite to conveniently collect, gather, and display power measurement from networking hardware.
MIT License
2 stars 1 forks source link

Upgrade python PostgreSQL adapter from psycopg2 to psycopg3 #1

Open UsualSpec opened 3 months ago

UsualSpec commented 3 months ago

Currently all python scripts use psycopg2. However, psycopg3 is available (https://www.psycopg.org/psycopg3/docs/). psycopg3 is by default compatible with gevent what we use for the web based applicatoins (e.g. it supports monkey patching out of the box --> Can be run more reliably on the webserver) and has an easier transaction model.

We should update to psycopg2 in future. This may require some work.