|
|
@@ -790,14 +790,11 @@ export class TaskService implements OnModuleInit {
|
|
|
candidateTasks[0].devices.push(device)
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- await Promise.all(
|
|
|
- res.map(async (r) => {
|
|
|
- if (r.devices.length > 0) {
|
|
|
- await this.dispatchTask(r.task, r.devices)
|
|
|
- }
|
|
|
- })
|
|
|
- )
|
|
|
+ for (let r of res) {
|
|
|
+ if (r.devices.length > 0) {
|
|
|
+ await this.dispatchTask(r.task, r.devices)
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
timeout: 1
|