Close MySQL session after running standalone commands

This commit is contained in:
Keith Edmunds 2023-01-27 10:53:28 +00:00
parent d471082e3f
commit e736cb82d2

View File

@ -1762,10 +1762,12 @@ if __name__ == "__main__":
log.debug("Updating database")
with Session() as session:
check_db(session)
engine.dispose()
elif args.update_bitrates:
log.debug("Update bitrates")
with Session() as session:
update_bitrates(session)
engine.dispose()
else:
# Normal run
try: