fleetmap-reports 2.0.179 → 2.0.181

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.179",
3
+ "version": "2.0.181",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -23,7 +23,7 @@ exports.parallel = (report, method, toSlice, ...args) => {
23
23
  reject(new Error('got empty slice'))
24
24
  }
25
25
  try {
26
- console.log('forking worker', workerCount++, report, method, slice)
26
+ console.log('forking worker', workerCount++, report, method, slice.length)
27
27
  const worker = cluster.fork()
28
28
  worker.send({
29
29
  report,
@@ -37,6 +37,7 @@ exports.parallel = (report, method, toSlice, ...args) => {
37
37
  resolve(_result.flat())
38
38
  }
39
39
  })
40
+ worker.on('error', e => console.error(e))
40
41
  } catch (e) {
41
42
  console.error(report, method, 'worker', workerCount, 'numCPUs', numCPUs)
42
43
  reject(e)
@@ -93,7 +93,7 @@ async function createZoneReport (from, to, userData, traccar) {
93
93
 
94
94
  async function processDevices (from, to, devices, userData, data) {
95
95
  const devicesResult = []
96
- console.log('processDevices', from, to, devices)
96
+ console.log('processDevices', from, to, devices.length)
97
97
  for (const d of devices) {
98
98
  const alerts = data.alerts.filter(t => t.deviceId === d.id)
99
99
  const deviceRoute = data.route.filter(p => p.deviceId === d.id)