restore autoflush

pull/142/head
Aevann 2023-03-18 15:11:30 +02:00
parent 49d958ef46
commit a88fb10455
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ limiter = Limiter(
engine = create_engine(app.config['SQLALCHEMY_DATABASE_URL'])
db_session = scoped_session(sessionmaker(bind=engine, autoflush=False))
db_session = scoped_session(sessionmaker(bind=engine))
const_initialize(db_session)

View File

@ -150,7 +150,7 @@ def process_video(file, v):
if extension not in {'mp4','avi','mkv'}:
new = new.replace(f'.{extension}', '.mp4')
copyfile(old, new)
db = Session(bind=g.db.get_bind(), autoflush=False)
db = Session(bind=g.db.get_bind())
gevent.spawn(convert_to_mp4, old, new, v.id, db)
else:
try: