diff --git a/myems-aggregation/combined_equipment_billing_input_category.py b/myems-aggregation/combined_equipment_billing_input_category.py index 80045cec..1dbde39e 100644 --- a/myems-aggregation/combined_equipment_billing_input_category.py +++ b/myems-aggregation/combined_equipment_billing_input_category.py @@ -250,20 +250,20 @@ def main(logger): break # end of for combined equipment loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/combined_equipment_billing_input_item.py b/myems-aggregation/combined_equipment_billing_input_item.py index 3d3381f8..4cccae67 100644 --- a/myems-aggregation/combined_equipment_billing_input_item.py +++ b/myems-aggregation/combined_equipment_billing_input_item.py @@ -250,20 +250,20 @@ def main(logger): break # end of for combined equipment loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/combined_equipment_billing_output_category.py b/myems-aggregation/combined_equipment_billing_output_category.py index 9dfd166b..39d1f9e7 100644 --- a/myems-aggregation/combined_equipment_billing_output_category.py +++ b/myems-aggregation/combined_equipment_billing_output_category.py @@ -250,20 +250,20 @@ def main(logger): break # end of for combined equipment loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/equipment_billing_input_category.py b/myems-aggregation/equipment_billing_input_category.py index 765fc43b..a5596dd1 100644 --- a/myems-aggregation/equipment_billing_input_category.py +++ b/myems-aggregation/equipment_billing_input_category.py @@ -249,20 +249,20 @@ def main(logger): break # end of for equipment loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/equipment_billing_input_item.py b/myems-aggregation/equipment_billing_input_item.py index 5573bc5e..e6d61e7f 100644 --- a/myems-aggregation/equipment_billing_input_item.py +++ b/myems-aggregation/equipment_billing_input_item.py @@ -249,20 +249,20 @@ def main(logger): break # end of for equipment loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/equipment_billing_output_category.py b/myems-aggregation/equipment_billing_output_category.py index 8a64d2d8..c1083b9a 100644 --- a/myems-aggregation/equipment_billing_output_category.py +++ b/myems-aggregation/equipment_billing_output_category.py @@ -249,20 +249,20 @@ def main(logger): break # end of for equipment loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/meter_billing.py b/myems-aggregation/meter_billing.py index 7ff426ca..d90fb61d 100644 --- a/myems-aggregation/meter_billing.py +++ b/myems-aggregation/meter_billing.py @@ -246,20 +246,20 @@ def main(logger): break # end of for meter loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/meter_carbon.py b/myems-aggregation/meter_carbon.py index 516b9cbe..f21a2a36 100644 --- a/myems-aggregation/meter_carbon.py +++ b/myems-aggregation/meter_carbon.py @@ -247,20 +247,20 @@ def main(logger): break # end of for meter loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_carbon_db: - cnx_carbon_db.close() if cursor_carbon_db: cursor_carbon_db.close() + if cnx_carbon_db: + cnx_carbon_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/offline_meter_billing.py b/myems-aggregation/offline_meter_billing.py index 3aba2aa1..6051d036 100644 --- a/myems-aggregation/offline_meter_billing.py +++ b/myems-aggregation/offline_meter_billing.py @@ -246,20 +246,20 @@ def main(logger): break # end of for offline_meter loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/offline_meter_carbon.py b/myems-aggregation/offline_meter_carbon.py index 06ef6076..4c8b2e1a 100644 --- a/myems-aggregation/offline_meter_carbon.py +++ b/myems-aggregation/offline_meter_carbon.py @@ -247,20 +247,20 @@ def main(logger): break # end of for offline meter loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_carbon_db: - cnx_carbon_db.close() if cursor_carbon_db: cursor_carbon_db.close() + if cnx_carbon_db: + cnx_carbon_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/shopfloor_billing_input_category.py b/myems-aggregation/shopfloor_billing_input_category.py index ee103cfd..d6c2cce5 100644 --- a/myems-aggregation/shopfloor_billing_input_category.py +++ b/myems-aggregation/shopfloor_billing_input_category.py @@ -249,20 +249,20 @@ def main(logger): break # end of for shopfloor loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/shopfloor_billing_input_item.py b/myems-aggregation/shopfloor_billing_input_item.py index 3db10182..ea7b1910 100644 --- a/myems-aggregation/shopfloor_billing_input_item.py +++ b/myems-aggregation/shopfloor_billing_input_item.py @@ -249,20 +249,20 @@ def main(logger): break # end of for shopfloor loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/store_billing_input_category.py b/myems-aggregation/store_billing_input_category.py index f0de9ccb..4ebe6419 100644 --- a/myems-aggregation/store_billing_input_category.py +++ b/myems-aggregation/store_billing_input_category.py @@ -249,20 +249,20 @@ def main(logger): break # end of for store loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/store_billing_input_item.py b/myems-aggregation/store_billing_input_item.py index be66fe38..c3c71a7d 100644 --- a/myems-aggregation/store_billing_input_item.py +++ b/myems-aggregation/store_billing_input_item.py @@ -249,20 +249,20 @@ def main(logger): break # end of for store loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/tariff.py b/myems-aggregation/tariff.py index c6d42f8a..a519a44e 100644 --- a/myems-aggregation/tariff.py +++ b/myems-aggregation/tariff.py @@ -36,10 +36,10 @@ def get_energy_category_tariffs(cost_center_id, energy_category_id, start_dateti rows_tariffs = cursor.fetchall() except Exception as e: print(str(e)) - if cnx: - cnx.close() if cursor: cursor.close() + if cnx: + cnx.close() return dict() if rows_tariffs is None or len(rows_tariffs) == 0: @@ -63,10 +63,10 @@ def get_energy_category_tariffs(cost_center_id, energy_category_id, start_dateti rows_timeofuse_tariffs = cursor.fetchall() except Exception as e: print(str(e)) - if cnx: - cnx.close() if cursor: cursor.close() + if cnx: + cnx.close() return dict() if cursor: @@ -137,10 +137,10 @@ def get_energy_item_tariffs(cost_center_id, energy_item_id, start_datetime_utc, rows_tariffs = cursor.fetchall() except Exception as e: print(str(e)) - if cnx: - cnx.close() if cursor: cursor.close() + if cnx: + cnx.close() return dict() if rows_tariffs is None or len(rows_tariffs) == 0: @@ -164,10 +164,10 @@ def get_energy_item_tariffs(cost_center_id, energy_item_id, start_datetime_utc, rows_timeofuse_tariffs = cursor.fetchall() except Exception as e: print(str(e)) - if cnx: - cnx.close() if cursor: cursor.close() + if cnx: + cnx.close() return dict() if cursor: diff --git a/myems-aggregation/tenant_billing_input_category.py b/myems-aggregation/tenant_billing_input_category.py index e148022e..e7d6ce5f 100644 --- a/myems-aggregation/tenant_billing_input_category.py +++ b/myems-aggregation/tenant_billing_input_category.py @@ -248,20 +248,20 @@ def main(logger): break # end of for tenant loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/tenant_billing_input_item.py b/myems-aggregation/tenant_billing_input_item.py index aa75c8cc..31994fac 100644 --- a/myems-aggregation/tenant_billing_input_item.py +++ b/myems-aggregation/tenant_billing_input_item.py @@ -248,20 +248,20 @@ def main(logger): break # end of for tenant loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/virtual_meter_billing.py b/myems-aggregation/virtual_meter_billing.py index cf1269d6..b976f586 100644 --- a/myems-aggregation/virtual_meter_billing.py +++ b/myems-aggregation/virtual_meter_billing.py @@ -246,20 +246,20 @@ def main(logger): break # end of for virtual_meter loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_billing_db: - cnx_billing_db.close() if cursor_billing_db: cursor_billing_db.close() + if cnx_billing_db: + cnx_billing_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...") diff --git a/myems-aggregation/virtual_meter_carbon.py b/myems-aggregation/virtual_meter_carbon.py index 98d82d78..4d0dcc40 100644 --- a/myems-aggregation/virtual_meter_carbon.py +++ b/myems-aggregation/virtual_meter_carbon.py @@ -247,20 +247,20 @@ def main(logger): break # end of for virtual_meter loop - if cnx_system_db: - cnx_system_db.close() if cursor_system_db: cursor_system_db.close() + if cnx_system_db: + cnx_system_db.close() - if cnx_energy_db: - cnx_energy_db.close() if cursor_energy_db: cursor_energy_db.close() + if cnx_energy_db: + cnx_energy_db.close() - if cnx_carbon_db: - cnx_carbon_db.close() if cursor_carbon_db: cursor_carbon_db.close() + if cnx_carbon_db: + cnx_carbon_db.close() print("go to sleep 300 seconds...") time.sleep(300) print("wake from sleep, and continue to work...")