fixed warnings in myems-aggregation service
parent
545d16660d
commit
04df9ac030
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
combined_equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_combined_equipments "
|
" FROM tbl_combined_equipments "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
combined_equipment_list = list()
|
|
||||||
for row in rows_combined_equipments:
|
for row in rows_combined_equipments:
|
||||||
combined_equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
combined_equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
combined_equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_combined_equipments "
|
" FROM tbl_combined_equipments "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
combined_equipment_list = list()
|
|
||||||
for row in rows_combined_equipments:
|
for row in rows_combined_equipments:
|
||||||
combined_equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
combined_equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
combined_equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_combined_equipments "
|
" FROM tbl_combined_equipments "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
combined_equipment_list = list()
|
|
||||||
for row in rows_combined_equipments:
|
for row in rows_combined_equipments:
|
||||||
combined_equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
combined_equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
combined_equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_combined_equipments "
|
" FROM tbl_combined_equipments "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
combined_equipment_list = list()
|
|
||||||
for row in rows_combined_equipments:
|
for row in rows_combined_equipments:
|
||||||
combined_equipment_list.append({"id": row[0], "name": row[1]})
|
combined_equipment_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
combined_equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_combined_equipments "
|
" FROM tbl_combined_equipments "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
combined_equipment_list = list()
|
|
||||||
for row in rows_combined_equipments:
|
for row in rows_combined_equipments:
|
||||||
combined_equipment_list.append({"id": row[0], "name": row[1]})
|
combined_equipment_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
combined_equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_combined_equipments "
|
" FROM tbl_combined_equipments "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
combined_equipment_list = list()
|
|
||||||
for row in rows_combined_equipments:
|
for row in rows_combined_equipments:
|
||||||
combined_equipment_list.append({"id": row[0], "name": row[1]})
|
combined_equipment_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_equipments "
|
" FROM tbl_equipments "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
equipment_list = list()
|
|
||||||
for row in rows_equipments:
|
for row in rows_equipments:
|
||||||
equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_equipments "
|
" FROM tbl_equipments "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
equipment_list = list()
|
|
||||||
for row in rows_equipments:
|
for row in rows_equipments:
|
||||||
equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_equipments "
|
" FROM tbl_equipments "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
equipment_list = list()
|
|
||||||
for row in rows_equipments:
|
for row in rows_equipments:
|
||||||
equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
equipment_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_equipments "
|
" FROM tbl_equipments "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
equipment_list = list()
|
|
||||||
for row in rows_equipments:
|
for row in rows_equipments:
|
||||||
equipment_list.append({"id": row[0], "name": row[1]})
|
equipment_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_equipments "
|
" FROM tbl_equipments "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
equipment_list = list()
|
|
||||||
for row in rows_equipments:
|
for row in rows_equipments:
|
||||||
equipment_list.append({"id": row[0], "name": row[1]})
|
equipment_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
equipment_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_equipments "
|
" FROM tbl_equipments "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
equipment_list = list()
|
|
||||||
for row in rows_equipments:
|
for row in rows_equipments:
|
||||||
equipment_list.append({"id": row[0], "name": row[1]})
|
equipment_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
meter_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, energy_category_id, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, energy_category_id, cost_center_id "
|
||||||
" FROM tbl_meters "
|
" FROM tbl_meters "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
meter_list = list()
|
|
||||||
for row in rows_meters:
|
for row in rows_meters:
|
||||||
meter_list.append({"id": row[0],
|
meter_list.append({"id": row[0],
|
||||||
"name": row[1],
|
"name": row[1],
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
shopfloor_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_shopfloors "
|
" FROM tbl_shopfloors "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
shopfloor_list = list()
|
|
||||||
for row in rows_shopfloors:
|
for row in rows_shopfloors:
|
||||||
shopfloor_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
shopfloor_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
shopfloor_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_shopfloors "
|
" FROM tbl_shopfloors "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
shopfloor_list = list()
|
|
||||||
for row in rows_shopfloors:
|
for row in rows_shopfloors:
|
||||||
shopfloor_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
shopfloor_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
shopfloor_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_shopfloors "
|
" FROM tbl_shopfloors "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
shopfloor_list = list()
|
|
||||||
for row in rows_shopfloors:
|
for row in rows_shopfloors:
|
||||||
shopfloor_list.append({"id": row[0], "name": row[1]})
|
shopfloor_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
shopfloor_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_shopfloors "
|
" FROM tbl_shopfloors "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
shopfloor_list = list()
|
|
||||||
for row in rows_shopfloors:
|
for row in rows_shopfloors:
|
||||||
shopfloor_list.append({"id": row[0], "name": row[1]})
|
shopfloor_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
space_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_spaces "
|
" FROM tbl_spaces "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
space_list = list()
|
|
||||||
for row in rows_spaces:
|
for row in rows_spaces:
|
||||||
space_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
space_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
space_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_spaces "
|
" FROM tbl_spaces "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
space_list = list()
|
|
||||||
for row in rows_spaces:
|
for row in rows_spaces:
|
||||||
space_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
space_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
space_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_spaces "
|
" FROM tbl_spaces "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
space_list = list()
|
|
||||||
for row in rows_spaces:
|
for row in rows_spaces:
|
||||||
space_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
space_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
space_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_spaces "
|
" FROM tbl_spaces "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
space_list = list()
|
|
||||||
for row in rows_spaces:
|
for row in rows_spaces:
|
||||||
space_list.append({"id": row[0], "name": row[1]})
|
space_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
space_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_spaces "
|
" FROM tbl_spaces "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
space_list = list()
|
|
||||||
for row in rows_spaces:
|
for row in rows_spaces:
|
||||||
space_list.append({"id": row[0], "name": row[1]})
|
space_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
space_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_spaces "
|
" FROM tbl_spaces "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
space_list = list()
|
|
||||||
for row in rows_spaces:
|
for row in rows_spaces:
|
||||||
space_list.append({"id": row[0], "name": row[1]})
|
space_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
store_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_stores "
|
" FROM tbl_stores "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
store_list = list()
|
|
||||||
for row in rows_stores:
|
for row in rows_stores:
|
||||||
store_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
store_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
store_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_stores "
|
" FROM tbl_stores "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
store_list = list()
|
|
||||||
for row in rows_stores:
|
for row in rows_stores:
|
||||||
store_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
store_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
store_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_stores "
|
" FROM tbl_stores "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
store_list = list()
|
|
||||||
for row in rows_stores:
|
for row in rows_stores:
|
||||||
store_list.append({"id": row[0], "name": row[1]})
|
store_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
store_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_stores "
|
" FROM tbl_stores "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
store_list = list()
|
|
||||||
for row in rows_stores:
|
for row in rows_stores:
|
||||||
store_list.append({"id": row[0], "name": row[1]})
|
store_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
tenant_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_tenants "
|
" FROM tbl_tenants "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
tenant_list = list()
|
|
||||||
for row in rows_tenants:
|
for row in rows_tenants:
|
||||||
tenant_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
tenant_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
@ -124,7 +124,6 @@ def main(logger):
|
||||||
print("Connected to MyEMS Billing Database")
|
print("Connected to MyEMS Billing Database")
|
||||||
|
|
||||||
for tenant in tenant_list:
|
for tenant in tenant_list:
|
||||||
|
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
# Step 2: get the latest start_datetime_utc
|
# Step 2: get the latest start_datetime_utc
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
|
|
|
@ -42,6 +42,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
tenant_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
cursor_system_db.execute(" SELECT id, name, cost_center_id "
|
||||||
" FROM tbl_tenants "
|
" FROM tbl_tenants "
|
||||||
|
@ -58,7 +59,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
tenant_list = list()
|
|
||||||
for row in rows_tenants:
|
for row in rows_tenants:
|
||||||
tenant_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
tenant_list.append({"id": row[0], "name": row[1], "cost_center_id": row[2]})
|
||||||
|
|
||||||
|
@ -124,7 +124,6 @@ def main(logger):
|
||||||
print("Connected to MyEMS Billing Database")
|
print("Connected to MyEMS Billing Database")
|
||||||
|
|
||||||
for tenant in tenant_list:
|
for tenant in tenant_list:
|
||||||
|
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
# Step 2: get the latest start_datetime_utc
|
# Step 2: get the latest start_datetime_utc
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
tenant_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_tenants "
|
" FROM tbl_tenants "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
tenant_list = list()
|
|
||||||
for row in rows_tenants:
|
for row in rows_tenants:
|
||||||
tenant_list.append({"id": row[0], "name": row[1]})
|
tenant_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Got all tenants in MyEMS System Database")
|
print("Got all tenants in MyEMS System Database")
|
||||||
|
|
||||||
# shuffle the tenant list for randomly calculating the meter hourly value
|
# shuffle the tenant list for randomly calculating the hourly values
|
||||||
random.shuffle(tenant_list)
|
random.shuffle(tenant_list)
|
||||||
|
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
|
|
|
@ -37,6 +37,7 @@ def main(logger):
|
||||||
continue
|
continue
|
||||||
print("Connected to MyEMS System Database")
|
print("Connected to MyEMS System Database")
|
||||||
|
|
||||||
|
tenant_list = list()
|
||||||
try:
|
try:
|
||||||
cursor_system_db.execute(" SELECT id, name "
|
cursor_system_db.execute(" SELECT id, name "
|
||||||
" FROM tbl_tenants "
|
" FROM tbl_tenants "
|
||||||
|
@ -49,7 +50,6 @@ def main(logger):
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
tenant_list = list()
|
|
||||||
for row in rows_tenants:
|
for row in rows_tenants:
|
||||||
tenant_list.append({"id": row[0], "name": row[1]})
|
tenant_list.append({"id": row[0], "name": row[1]})
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ def main(logger):
|
||||||
|
|
||||||
print("Got all tenants in MyEMS System Database")
|
print("Got all tenants in MyEMS System Database")
|
||||||
|
|
||||||
# shuffle the tenant list for randomly calculating the meter hourly value
|
# shuffle the tenant list for randomly calculating the hourly values
|
||||||
random.shuffle(tenant_list)
|
random.shuffle(tenant_list)
|
||||||
|
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
|
|
Loading…
Reference in New Issue