diff --git a/monitoring/db/scripts/get_detailed_power.py b/monitoring/db/scripts/get_detailed_power.py index 883d77f..1d84672 100755 --- a/monitoring/db/scripts/get_detailed_power.py +++ b/monitoring/db/scripts/get_detailed_power.py @@ -172,7 +172,6 @@ as t(time bigint, name varchar, avg double precision); @staticmethod def init_db(verbose): import sqlalchemy as db - _verbose = False #True engine = db.create_engine('postgresql://hpc@hawk-monitor4:5432/coe_mon', echo=verbose) connection = engine.connect() return connection @@ -193,7 +192,8 @@ as t(time bigint, name varchar, avg double precision); query = self.build_query(jobid, interval, hawk_ai) return self.connection.execute(query).fetchall() - def db_to_pf(self, jobid, intrval, hawk_ai): + def db_to_pf(self, jobid, interval, hawk_ai): + import pandas as pd query = self.build_query(jobid, interval, hawk_ai) return pd.read_sql(query, con=self.connection)