@halsystems/red-bacnet 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/common/job/read_point.js +12 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/common/job/read_point.js
CHANGED
|
@@ -211,7 +211,7 @@ module.exports = {
|
|
|
211
211
|
smartReadEvent.on(EVENT_OUTPUT, (data) => {
|
|
212
212
|
this.#updateProgress(
|
|
213
213
|
Math.round((85 / size) * (count + 1) + 10)
|
|
214
|
-
)
|
|
214
|
+
);
|
|
215
215
|
|
|
216
216
|
if (Array.isArray(data.result))
|
|
217
217
|
data.result.forEach(i => {
|
|
@@ -223,15 +223,17 @@ module.exports = {
|
|
|
223
223
|
count++;
|
|
224
224
|
});
|
|
225
225
|
|
|
226
|
-
const tasks = entries
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
226
|
+
const tasks = entries
|
|
227
|
+
.filter(([_, v]) => Array.isArray(v.points) && v.points.length > 0) // eslint-disable-line
|
|
228
|
+
.map(([k, v]) => ({
|
|
229
|
+
id: k,
|
|
230
|
+
task: async () => {
|
|
231
|
+
return await smartReadProperty(
|
|
232
|
+
this.client, v.device, v.points, this.readMethod,
|
|
233
|
+
this.maxConcurrentSinglePointRead, 10, this.concurrentTaskDelay
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
}));
|
|
235
237
|
|
|
236
238
|
await concurrentTasks(smartReadEvent, tasks, this.maxConcurrentDeviceRead);
|
|
237
239
|
|