modify scripts

This commit is contained in:
oscarz
2025-04-02 11:51:53 +08:00
parent be9850dfc0
commit 26ad0d7935

View File

@ -390,14 +390,14 @@ def main(cmd, args_debug, args_force):
for short_name in function_names: for short_name in function_names:
func = function_map.get(short_name.strip()) # 从映射中获取对应的函数 func = function_map.get(short_name.strip()) # 从映射中获取对应的函数
if callable(func): if callable(func):
db_tools.update_task_log(task_id, task_status=f'Running {func}') db_tools.update_task_log(task_id, task_status=f'Running {short_name}')
func() func()
else: else:
print(f"Warning: {short_name} is not a valid function shortcut.") print(f"Warning: {short_name} is not a valid function shortcut.")
else: # 全量执行 else: # 全量执行
for name, func in function_map.items(): for name, func in function_map.items():
if callable(func): if callable(func):
db_tools.update_task_log(task_id, task_status=f'Running {func}') db_tools.update_task_log(task_id, task_status=f'Running {name}')
func() func()
else: else:
print(f"Warning: {name} is not a valid function shortcut.") print(f"Warning: {name} is not a valid function shortcut.")