XuJiacheng ea3cda0030 feat(upgrade): 支持批量升级主机并优化错误处理
- 新增 UPGRADE_BATCH_SIZE 环境变量,允许配置批量升级的主机数量
- 重构 upgradeController.js,将单主机循环改为按批次处理
- 批量触发升级和查询状态,减少 API 调用次数
- 改进错误处理,确保批次中每个主机的失败都能独立记录日志
- 使用 pendingHosts 集合跟踪批次内未完成的主机,避免重复轮询
2026-01-27 11:35:41 +08:00

RCU Upgrade Service

Overview

Node.js backend service to manage RCU firmware upgrades. Triggers upgrades via Upgrade_V2 API and polls status via QueryUpdateHostProgressBar.

Setup

  1. Install dependencies: npm install
  2. Configure .env (see .env.example or documentation)
  3. Setup PostgreSQL database test_upgrade.

Running

  • Dev: npm run dev
  • Production: pm2 start pm2.json

Spec & Validation

  • Lint Spec: npm run spec:lint
  • Validate Spec: npm run spec:validate

Testing

  • Run tests: npm test
Description
RCU升级测试脚本
Readme 134 KiB
Languages
JavaScript 100%