This commit is contained in:
张成
2025-12-30 15:49:51 +08:00
parent dd7373c0b8
commit fa2dea3f04

View File

@@ -177,26 +177,18 @@ class ScheduleManager {
}
}
// 创建调度管理器实例
// 创建并导出调度管理器实例
const scheduleManager = new ScheduleManager();
// 导出兼容接口,保持与原有代码的一致性
// 导出兼容接口(简化版)
module.exports = {
// 初始化方法
init: () => scheduleManager.init(),
// 获取系统状态
getSystemStatus: () => scheduleManager.getSystemStatus(),
// 停止系统
stop: () => scheduleManager.stop(),
// 访问各个组件(为了兼容性
// 直接暴露属性(使用 getter 保持动态访问)
get mqttClient() { return scheduleManager.mqttClient; },
get isInitialized() { return scheduleManager.isInitialized; },
// 访问各个组件实例(简化版)
get taskQueue() { return TaskQueue; },
get command() { return Command; },
get deviceManager() { return deviceManager; }