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