update
This commit is contained in:
@@ -372,55 +372,6 @@ def upload_to_s3(json_data: str):
|
||||
# print(f"JSON解析错误: {e}")
|
||||
return f"Error: {str(e)}, Request human/user intervention."
|
||||
|
||||
def get_latest_exp_log():
|
||||
def get_uv_latest_file():
|
||||
import os
|
||||
import glob
|
||||
# UV数据缓存文件夹路径 (请将此路径修改为实际的文件夹路径)
|
||||
current_folder = os.path.dirname(os.path.abspath(__file__))
|
||||
folder_path = os.path.join(current_folder, 'data/UV/')
|
||||
|
||||
# 查找文件夹中的所有 .wls 文件
|
||||
uv_files = sorted(glob.glob(os.path.join(folder_path, '*.[Tt][Xx][Tt]')))
|
||||
|
||||
if not uv_files:
|
||||
res = f"ERROR: 缓存文件夹{current_folder}中没有找到任何UV文件"
|
||||
return res
|
||||
|
||||
# 找到最新修改的文件
|
||||
latest_file = uv_files[-1]
|
||||
res = f"找到最新的UV数据文件: {latest_file}"
|
||||
|
||||
return res
|
||||
|
||||
def get_pl_latest_file():
|
||||
import os
|
||||
import glob
|
||||
|
||||
current_folder = os.path.dirname(os.path.abspath(__file__))
|
||||
folder_path = os.path.join(current_folder, 'data/PL/')
|
||||
|
||||
# 查找文件夹中的所有 .txt 或 .TXT 文件
|
||||
pl_files = sorted(glob.glob(os.path.join(folder_path, '*.[Tt][Xx][Tt]')))
|
||||
|
||||
if not pl_files:
|
||||
res = f"ERROR: 缓存文件夹{current_folder}中没有找到任何PL文件"
|
||||
return res
|
||||
|
||||
# 找到最新修改的文件
|
||||
latest_file = pl_files[-1]
|
||||
res = f"找到最新的PL数据文件: {latest_file}"
|
||||
return res
|
||||
|
||||
pl_latest = get_pl_latest_file()
|
||||
uv_latest = get_uv_latest_file()
|
||||
|
||||
return pl_latest + "\n" + uv_latest
|
||||
|
||||
|
||||
def read_data():
|
||||
get_latest_exp_log()
|
||||
|
||||
|
||||
def default_func():
|
||||
return "Approved. Proceed as planned!"
|
||||
|
||||
Reference in New Issue
Block a user