Browse Source

add 添加子设备消息类型

18339543638 4 years ago
parent
commit
f64c395881

+ 2 - 0
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/web/DeviceDirectiveController.java

@@ -66,6 +66,8 @@ public class DeviceDirectiveController implements
     @Operation(summary = "批量重新发送指令到设备")
     public Mono<Void> resendDirectives(@RequestBody Mono<List<String>> idList){
         return  idList.flatMapMany(directivesService::findById)
+            .parallel(Runtime.getRuntime().availableProcessors()*2)
+            .runOn(Schedulers.parallel())
             .flatMap(directive->
                 registry.getDevice(directive.getDeviceId())
                     .flatMap(operator -> Mono.just(operator.messageSender()))