优化代码。

This commit is contained in:
chenxudong 2025-06-05 11:27:17 +08:00
parent cca03566a9
commit 5d0229a848
2 changed files with 2 additions and 2 deletions

BIN
dist/start.exe vendored

Binary file not shown.

View File

@ -59,7 +59,7 @@ def delete_old_files(directory, days=2):
except Exception as e:
logger.info(f"处理文件 {filename} 时出错: {str(e)}", file=sys.stderr)
logger.info(f"\n操作完成!共删除 {deleted_count}文件。")
logger.info(f"\n操作完成!共删除 {deleted_count}日志文件。")
except Exception as e:
logger.info(f"遍历目录时出错: {str(e)}", file=sys.stderr)
@ -72,7 +72,7 @@ def start():
try:
ensure_dir(app_log_dir)
new_jar_path = get_resource_path(jar_path)
java_command = [new_java_path, " -Xms4096m -Xmx4096m -jar", new_jar_path]
java_command = [new_java_path, "-Xms4096m", "-Xmx4096m", "-jar", new_jar_path]
# 创建新进程组支持Unix/Windows的进程隔离
creation_flags = subprocess.CREATE_NEW_PROCESS_GROUP
# 重定向输出到日志文件