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