fix: error in migrate_annotation_vector_database when exec vdb-migrate (#15937)

Co-authored-by: crazywoola <427733928@qq.com>
pull/14262/head
Naoki KOBAYASHI 1 year ago committed by Bharat Ramanathan
parent 73583d5d0c
commit 3b9be58cc8

@ -160,11 +160,17 @@ def migrate_annotation_vector_database():
while True: while True:
try: try:
# get apps info # get apps info
per_page = 50
apps = ( apps = (
App.query.filter(App.status == "normal") db.session.query(App)
.filter(App.status == "normal")
.order_by(App.created_at.desc()) .order_by(App.created_at.desc())
.paginate(page=page, per_page=50) .limit(per_page)
.offset((page - 1) * per_page)
.all()
) )
if not apps:
break
except NotFound: except NotFound:
break break

Loading…
Cancel
Save