perf: 优化历史数据分词处理兜底操作 (#313)
parent
a788d8f3b8
commit
62c959f905
|
|
@ -18,6 +18,7 @@ def update_embedding_search_vector(embedding, paragraph_list):
|
|||
|
||||
|
||||
def save_keywords(apps, schema_editor):
|
||||
try:
|
||||
document = apps.get_model("dataset", "Document")
|
||||
embedding = apps.get_model("embedding", "Embedding")
|
||||
paragraph = apps.get_model('dataset', 'Paragraph')
|
||||
|
|
@ -39,6 +40,8 @@ def save_keywords(apps, schema_editor):
|
|||
print(e)
|
||||
document.status = Status.success
|
||||
document.save()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
|
|||
Loading…
Reference in New Issue