moved cursor.close before cnx.close in myems aggregation service
parent
c0fb3251c9
commit
d881705193
|
@ -249,20 +249,20 @@ def main(logger):
|
||||||
break
|
break
|
||||||
|
|
||||||
# end of for space loop
|
# end of for space loop
|
||||||
if cnx_system_db:
|
|
||||||
cnx_system_db.close()
|
|
||||||
if cursor_system_db:
|
if cursor_system_db:
|
||||||
cursor_system_db.close()
|
cursor_system_db.close()
|
||||||
|
if cnx_system_db:
|
||||||
|
cnx_system_db.close()
|
||||||
|
|
||||||
if cnx_energy_db:
|
|
||||||
cnx_energy_db.close()
|
|
||||||
if cursor_energy_db:
|
if cursor_energy_db:
|
||||||
cursor_energy_db.close()
|
cursor_energy_db.close()
|
||||||
|
if cnx_energy_db:
|
||||||
|
cnx_energy_db.close()
|
||||||
|
|
||||||
if cnx_billing_db:
|
|
||||||
cnx_billing_db.close()
|
|
||||||
if cursor_billing_db:
|
if cursor_billing_db:
|
||||||
cursor_billing_db.close()
|
cursor_billing_db.close()
|
||||||
|
if cnx_billing_db:
|
||||||
|
cnx_billing_db.close()
|
||||||
print("go to sleep 300 seconds...")
|
print("go to sleep 300 seconds...")
|
||||||
time.sleep(300)
|
time.sleep(300)
|
||||||
print("wake from sleep, and continue to work...")
|
print("wake from sleep, and continue to work...")
|
||||||
|
|
|
@ -249,20 +249,20 @@ def main(logger):
|
||||||
break
|
break
|
||||||
|
|
||||||
# end of for space loop
|
# end of for space loop
|
||||||
if cnx_system_db:
|
|
||||||
cnx_system_db.close()
|
|
||||||
if cursor_system_db:
|
if cursor_system_db:
|
||||||
cursor_system_db.close()
|
cursor_system_db.close()
|
||||||
|
if cnx_system_db:
|
||||||
|
cnx_system_db.close()
|
||||||
|
|
||||||
if cnx_energy_db:
|
|
||||||
cnx_energy_db.close()
|
|
||||||
if cursor_energy_db:
|
if cursor_energy_db:
|
||||||
cursor_energy_db.close()
|
cursor_energy_db.close()
|
||||||
|
if cnx_energy_db:
|
||||||
|
cnx_energy_db.close()
|
||||||
|
|
||||||
if cnx_billing_db:
|
|
||||||
cnx_billing_db.close()
|
|
||||||
if cursor_billing_db:
|
if cursor_billing_db:
|
||||||
cursor_billing_db.close()
|
cursor_billing_db.close()
|
||||||
|
if cnx_billing_db:
|
||||||
|
cnx_billing_db.close()
|
||||||
print("go to sleep 300 seconds...")
|
print("go to sleep 300 seconds...")
|
||||||
time.sleep(300)
|
time.sleep(300)
|
||||||
print("wake from sleep, and continue to work...")
|
print("wake from sleep, and continue to work...")
|
||||||
|
|
|
@ -249,20 +249,20 @@ def main(logger):
|
||||||
break
|
break
|
||||||
|
|
||||||
# end of for space loop
|
# end of for space loop
|
||||||
if cnx_system_db:
|
|
||||||
cnx_system_db.close()
|
|
||||||
if cursor_system_db:
|
if cursor_system_db:
|
||||||
cursor_system_db.close()
|
cursor_system_db.close()
|
||||||
|
if cnx_system_db:
|
||||||
|
cnx_system_db.close()
|
||||||
|
|
||||||
if cnx_energy_db:
|
|
||||||
cnx_energy_db.close()
|
|
||||||
if cursor_energy_db:
|
if cursor_energy_db:
|
||||||
cursor_energy_db.close()
|
cursor_energy_db.close()
|
||||||
|
if cnx_energy_db:
|
||||||
|
cnx_energy_db.close()
|
||||||
|
|
||||||
if cnx_billing_db:
|
|
||||||
cnx_billing_db.close()
|
|
||||||
if cursor_billing_db:
|
if cursor_billing_db:
|
||||||
cursor_billing_db.close()
|
cursor_billing_db.close()
|
||||||
|
if cnx_billing_db:
|
||||||
|
cnx_billing_db.close()
|
||||||
print("go to sleep 300 seconds...")
|
print("go to sleep 300 seconds...")
|
||||||
time.sleep(300)
|
time.sleep(300)
|
||||||
print("wake from sleep, and continue to work...")
|
print("wake from sleep, and continue to work...")
|
||||||
|
|
Loading…
Reference in New Issue