added historical database close and disconnect at the end of reports
parent
7d4362f586
commit
319b5738d9
|
@ -452,6 +452,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -560,6 +560,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -466,6 +466,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -456,6 +456,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -432,6 +432,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -452,6 +452,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -432,6 +432,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -586,6 +586,11 @@ class Reporting:
|
|||
if cnx_energy_baseline:
|
||||
cnx_energy_baseline.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -458,6 +458,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['combined_equipment'] = dict()
|
||||
|
|
|
@ -441,6 +441,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['equipment'] = dict()
|
||||
|
|
|
@ -456,6 +456,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['equipment'] = dict()
|
||||
|
|
|
@ -448,6 +448,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['equipment'] = dict()
|
||||
|
|
|
@ -423,6 +423,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['equipment'] = dict()
|
||||
|
|
|
@ -445,6 +445,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['equipment'] = dict()
|
||||
|
|
|
@ -423,6 +423,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['equipment'] = dict()
|
||||
|
|
|
@ -575,6 +575,11 @@ class Reporting:
|
|||
if cnx_energy_baseline:
|
||||
cnx_energy_baseline.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['equipment'] = dict()
|
||||
|
|
|
@ -451,6 +451,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['equipment'] = dict()
|
||||
|
|
|
@ -457,6 +457,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['shopfloor'] = dict()
|
||||
|
|
|
@ -471,6 +471,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['shopfloor'] = dict()
|
||||
|
|
|
@ -463,6 +463,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['shopfloor'] = dict()
|
||||
|
|
|
@ -460,6 +460,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['shopfloor'] = dict()
|
||||
|
|
|
@ -590,6 +590,11 @@ class Reporting:
|
|||
if cnx_energy_baseline:
|
||||
cnx_energy_baseline.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['shopfloor'] = dict()
|
||||
|
|
|
@ -466,6 +466,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['shopfloor'] = dict()
|
||||
|
|
|
@ -499,6 +499,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -554,6 +554,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -519,6 +519,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -506,6 +506,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -480,6 +480,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -460,6 +460,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -480,6 +480,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -661,6 +661,11 @@ class Reporting:
|
|||
if cnx_energy_baseline:
|
||||
cnx_energy_baseline.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -464,6 +464,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['space'] = dict()
|
||||
|
|
|
@ -455,6 +455,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['store'] = dict()
|
||||
|
|
|
@ -469,6 +469,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['store'] = dict()
|
||||
|
|
|
@ -461,6 +461,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['store'] = dict()
|
||||
|
|
|
@ -460,6 +460,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['store'] = dict()
|
||||
|
|
|
@ -586,6 +586,11 @@ class Reporting:
|
|||
if cnx_energy_baseline:
|
||||
cnx_energy_baseline.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['store'] = dict()
|
||||
|
|
|
@ -465,6 +465,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['store'] = dict()
|
||||
|
|
|
@ -455,6 +455,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['tenant'] = dict()
|
||||
|
|
|
@ -469,6 +469,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['tenant'] = dict()
|
||||
|
|
|
@ -461,6 +461,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['tenant'] = dict()
|
||||
|
|
|
@ -460,6 +460,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['tenant'] = dict()
|
||||
|
|
|
@ -586,6 +586,11 @@ class Reporting:
|
|||
if cnx_energy_baseline:
|
||||
cnx_energy_baseline.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['tenant'] = dict()
|
||||
|
|
|
@ -464,6 +464,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = dict()
|
||||
|
||||
result['tenant'] = dict()
|
||||
|
|
|
@ -341,6 +341,11 @@ class Reporting:
|
|||
if cnx_billing:
|
||||
cnx_billing.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = {
|
||||
"virtual_meter": {
|
||||
"cost_center_id": virtual_meter['cost_center_id'],
|
||||
|
|
|
@ -281,6 +281,11 @@ class Reporting:
|
|||
if cnx_energy:
|
||||
cnx_energy.disconnect()
|
||||
|
||||
if cnx_historical:
|
||||
cnx_historical.close()
|
||||
if cursor_historical:
|
||||
cursor_historical.disconnect()
|
||||
|
||||
result = {
|
||||
"virtual_meter": {
|
||||
"cost_center_id": virtual_meter['cost_center_id'],
|
||||
|
|
Loading…
Reference in New Issue