- 新增 UPGRADE_BATCH_SIZE 环境变量,允许配置批量升级的主机数量 - 重构 upgradeController.js,将单主机循环改为按批次处理 - 批量触发升级和查询状态,减少 API 调用次数 - 改进错误处理,确保批次中每个主机的失败都能独立记录日志 - 使用 pendingHosts 集合跟踪批次内未完成的主机,避免重复轮询
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
- Install dependencies:
npm install - Configure
.env(see.env.exampleor documentation) - 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
Languages
JavaScript
100%