mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复向量化失败,缓存未被删除 (#887)
This commit is contained in:
parent
3c7142ed7c
commit
6aa2a682bc
|
|
@ -13,6 +13,6 @@ from .listener_manage import *
|
|||
|
||||
def run():
|
||||
listener_manage.ListenerManagement().run()
|
||||
QuerySet(Document).filter(status=Status.embedding).update(**{'status': Status.error})
|
||||
QuerySet(Document).filter(status__in=[Status.embedding, Status.queue_up]).update(**{'status': Status.error})
|
||||
QuerySet(Model).filter(status=setting.models.Status.DOWNLOAD).update(status=setting.models.Status.ERROR,
|
||||
meta={'message': "下载程序被中断,请重试"})
|
||||
|
|
|
|||
|
|
@ -30,8 +30,10 @@ def get_cache_key(poxy_function, args):
|
|||
|
||||
def get_cache_poxy_function(poxy_function, cache_key):
|
||||
def fun(args, **keywords):
|
||||
poxy_function(args, **keywords)
|
||||
memory_cache.delete(cache_key)
|
||||
try:
|
||||
poxy_function(args, **keywords)
|
||||
finally:
|
||||
memory_cache.delete(cache_key)
|
||||
|
||||
return fun
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue