Reset all corpora on deploy cli command

This commit is contained in:
Patrick Jentsch 2024-11-07 08:31:31 +01:00
parent 289a551122
commit 5ea6d45f46

View File

@ -44,7 +44,7 @@ def deploy():
TesseractOCRPipelineModel.insert_defaults()
print('Stop running analysis sessions')
for corpus in Corpus.query.filter(Corpus.num_analysis_sessions > 0).all():
for corpus in Corpus.query.all():
corpus.num_analysis_sessions = 0
db.session.commit()