소스 검색

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

Co-authored-by: crazywoola <427733928@qq.com>
tags/1.1.0
Naoki KOBAYASHI 7 달 전
부모
커밋
e91531fc23
No account linked to committer's email address
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8
    2
      api/commands.py

+ 8
- 2
api/commands.py 파일 보기

@@ -160,11 +160,17 @@ def migrate_annotation_vector_database():
while True:
try:
# get apps info
per_page = 50
apps = (
App.query.filter(App.status == "normal")
db.session.query(App)
.filter(App.status == "normal")
.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:
break


Loading…
취소
저장