REM:
1. 设备同步状态时移入同步锁
This commit is contained in:
HuangXin 2021-01-27 18:37:47 +08:00
parent 97c00c3523
commit 862a352b28
1 changed files with 7 additions and 5 deletions

View File

@ -197,11 +197,13 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
@Async("deviceTaskExecutor") @Async("deviceTaskExecutor")
@Scheduled(fixedDelay = 1000) @Scheduled(fixedDelay = 1000)
public void runPeriodTask() { public void runPeriodTask() {
getAllAbilityDevices().forEach(v -> { synchronized (this) {
v.getDb().periodTaskRuntime(); getAllAbilityDevices().forEach(v -> {
// 同步最新处置平台业务信息到设备 v.getDb().periodTaskRuntime();
v.getDb().upgradeServiceGroup(serviceGroupMapper.selectAll()); // 同步最新处置平台业务信息到设备
}); v.getDb().upgradeServiceGroup(serviceGroupMapper.selectAll());
});
}
} }
/** /**