Close MySQL session after running standalone commands
This commit is contained in:
parent
d471082e3f
commit
e736cb82d2
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user