You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
474 B

import logging
import time
# 后台任务,监控是否有新的未训练的文档进行训练
def train_document_task():
print("线程5秒后开始运行【监控是否有新的未训练的文档进行训练】")
time.sleep(5) # 线程5秒后开始运行
# 这里放置你的线程逻辑
while True:
# 这里可以放置你的线程要执行的代码
logging.info("线程正在运行")
time.sleep(1000) # 每隔10秒执行一次