From a77ff095f820d9236e50f5b79810d9872a9558de Mon Sep 17 00:00:00 2001 From: iVamp Date: Sat, 18 Nov 2023 19:41:38 +0800 Subject: [PATCH] update --- document_ai/{worker.py => chunk.py} | 4 ++++ document_ai/run.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) rename document_ai/{worker.py => chunk.py} (95%) diff --git a/document_ai/worker.py b/document_ai/chunk.py similarity index 95% rename from document_ai/worker.py rename to document_ai/chunk.py index a4fcc75..9824baa 100644 --- a/document_ai/worker.py +++ b/document_ai/chunk.py @@ -33,3 +33,7 @@ def sync_documents(): print("更新向量完成") time.sleep(1 * 5) + + +if __name__ == '__main__': + sync_documents() \ No newline at end of file diff --git a/document_ai/run.py b/document_ai/run.py index 5377acc..68df9cb 100644 --- a/document_ai/run.py +++ b/document_ai/run.py @@ -1,11 +1,11 @@ from threading import Thread -import worker +import chunk import server if __name__ == '__main__': # Start the worker thread - worker_thread = Thread(target=worker.sync_documents, args=()) + worker_thread = Thread(target=chunk.sync_documents, args=()) worker_thread.start() # Start the server thread