Commit 780f4c72 authored by jyong's avatar jyong

add notion page icon to document

parent 80a3d577
...@@ -91,7 +91,7 @@ def document_indexing_sync_task(dataset_id: str, document_id: str): ...@@ -91,7 +91,7 @@ def document_indexing_sync_task(dataset_id: str, document_id: str):
logging.exception("Cleaned document when document update data source or process rule failed") logging.exception("Cleaned document when document update data source or process rule failed")
try: try:
indexing_runner = IndexingRunner() indexing_runner = IndexingRunner()
indexing_runner.run(list(document)) indexing_runner.run([document])
end_at = time.perf_counter() end_at = time.perf_counter()
logging.info(click.style('update document: {} latency: {}'.format(document.id, end_at - start_at), fg='green')) logging.info(click.style('update document: {} latency: {}'.format(document.id, end_at - start_at), fg='green'))
except DocumentIsPausedException: except DocumentIsPausedException:
......
...@@ -67,7 +67,7 @@ def document_indexing_update_task(dataset_id: str, document_id: str): ...@@ -67,7 +67,7 @@ def document_indexing_update_task(dataset_id: str, document_id: str):
logging.exception("Cleaned document when document update data source or process rule failed") logging.exception("Cleaned document when document update data source or process rule failed")
try: try:
indexing_runner = IndexingRunner() indexing_runner = IndexingRunner()
indexing_runner.run(list(document)) indexing_runner.run([document])
end_at = time.perf_counter() end_at = time.perf_counter()
logging.info(click.style('update document: {} latency: {}'.format(document.id, end_at - start_at), fg='green')) logging.info(click.style('update document: {} latency: {}'.format(document.id, end_at - start_at), fg='green'))
except DocumentIsPausedException: except DocumentIsPausedException:
......
...@@ -34,7 +34,7 @@ def recover_document_indexing_task(dataset_id: str, document_id: str): ...@@ -34,7 +34,7 @@ def recover_document_indexing_task(dataset_id: str, document_id: str):
try: try:
indexing_runner = IndexingRunner() indexing_runner = IndexingRunner()
if document.indexing_status in ["waiting", "parsing", "cleaning"]: if document.indexing_status in ["waiting", "parsing", "cleaning"]:
indexing_runner.run(list(document)) indexing_runner.run([document])
elif document.indexing_status == "splitting": elif document.indexing_status == "splitting":
indexing_runner.run_in_splitting_status(document) indexing_runner.run_in_splitting_status(document)
elif document.indexing_status == "indexing": elif document.indexing_status == "indexing":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment