Add source reference for SQL query string

This commit is contained in:
Jose Gracia 2024-01-12 13:37:02 +00:00
parent 11c85ba378
commit 03a35834a1

View file

@ -155,6 +155,7 @@ class MonitoringDB:
@staticmethod @staticmethod
def build_query(jobid, interval): def build_query(jobid, interval):
"""Query taken from https://kb.hlrs.de/monitoring/index.php/TimescaleDB_-_Query_Guidelines#Power_by_Job_Query"""
import sqlalchemy as db import sqlalchemy as db
query_string = """with job as ( query_string = """with job as (
select job_id, starttime, endtime, nodes from jobs where job_id='{jobid}.hawk-pbs5' select job_id, starttime, endtime, nodes from jobs where job_id='{jobid}.hawk-pbs5'