fleetmap-reports 2.0.182 → 2.0.183

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "2.0.182",
3
+ "version": "2.0.183",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -37,7 +37,7 @@ exports.parallel = (report, method, toSlice, ...args) => {
37
37
  resolve(_result.flat())
38
38
  }
39
39
  })
40
- worker.on('error', e => reject(e))
40
+ worker.on('error', e => {console.error(e); reject(e)})
41
41
  worker.on('exit', (code, signal) => {
42
42
  if (code !== 0) {
43
43
  const error = `Worker exited with code ${code} and signal ${signal}`
@@ -81,7 +81,7 @@ async function createZoneReport (from, to, userData, traccar) {
81
81
  } else {
82
82
  alerts.push(...(await parallel('zone-report', 'getInAndOutEvents', slice, cleanPositions(route), userData)))
83
83
  }
84
- allData.devices.push(...await processDevices(from, to, devices, userData, { alerts, route, summary: data.summary }))
84
+ allData.devices.push(...await processDevices(from, to, slice, userData, { alerts, route, summary: data.summary }))
85
85
 
86
86
  deviceCount = deviceCount + slice.length
87
87
  }