临时提交
This commit is contained in:
@@ -4,6 +4,8 @@ import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from Utils.LogManager import LogManager
|
||||
|
||||
if "IOSAI_PYTHON" not in os.environ:
|
||||
base_path = Path(sys.argv[0]).resolve()
|
||||
base_dir = base_path.parent if base_path.is_file() else base_path
|
||||
@@ -28,7 +30,7 @@ print(f"日志目录: {LOG_DIR}")
|
||||
|
||||
def _run_flask_role():
|
||||
from Module import FlaskService
|
||||
port = int(os.getenv("FLASK_COMM_PORT", "34567")) # 固定端口的兜底仍是 34567
|
||||
port = int(os.getenv("FLASK_COMM_PORT", "34566")) # 固定端口的兜底仍是 34567
|
||||
app_factory = getattr(FlaskService, "create_app", None)
|
||||
app = app_factory() if callable(app_factory) else FlaskService.app
|
||||
app.run(host="0.0.0.0", port=port + 1, debug=False, use_reloader=False)
|
||||
@@ -37,19 +39,18 @@ if "--role=flask" in sys.argv:
|
||||
_run_flask_role()
|
||||
sys.exit(0)
|
||||
|
||||
# 启动锁
|
||||
def main(arg):
|
||||
print(arg)
|
||||
if len(arg) != 2:
|
||||
if len(arg) != 2 or arg[1] != "iosai":
|
||||
sys.exit(0)
|
||||
else:
|
||||
if arg[1] != "iosai":
|
||||
sys.exit(0)
|
||||
|
||||
# 项目入口
|
||||
if __name__ == "__main__":
|
||||
|
||||
# 获取启动时候传递的参数
|
||||
main(sys.argv)
|
||||
# 清空日志
|
||||
LogManager.clearLogs()
|
||||
|
||||
# main(sys.argv)
|
||||
|
||||
# 添加iOS开发包到电脑上
|
||||
deployer = DevDiskImageDeployer(verbose=True)
|
||||
|
||||
Reference in New Issue
Block a user