|
|
@@ -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()))
|