Skip to content

Commit

Permalink
fix: 程序启动将正在下载的模型设置为失败状态
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 committed Mar 22, 2024
1 parent 8ba67f0 commit 2d91a0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/common/event/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
@date:2023/11/10 10:43
@desc:
"""
import setting.models
from setting.models import Model
from .listener_manage import *


def run():
listener_manage.ListenerManagement().run()
QuerySet(Document).filter(status=Status.embedding).update(**{'status': Status.error})
QuerySet(Model).filter(status=setting.models.Status.DOWNLOAD).update(status=setting.models.Status.ERROR,
meta={'message': "下载程序被中断,请重试"})

0 comments on commit 2d91a0f

Please sign in to comment.