fleetmap-reports 2.0.190 → 2.0.191
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 +1 -1
- package/src/util/traccar.js +4 -4
- package/src/zone-report.js +1 -1
package/package.json
CHANGED
package/src/util/traccar.js
CHANGED
|
@@ -110,12 +110,12 @@ async function getAllInOne (
|
|
|
110
110
|
console.log('LOADING_MESSAGE:' + _chunk[0].name)
|
|
111
111
|
if (counter) {
|
|
112
112
|
counter.count += devicesPerRequest
|
|
113
|
-
ignorePercentage || console.log(`PROGRESS_PERC:${counter.count / totalDevices * 100}`)
|
|
113
|
+
ignorePercentage || console.log(`PROGRESS_PERC:${Math.round(counter.count / totalDevices * 100)}`)
|
|
114
114
|
} else {
|
|
115
115
|
currentDeviceCount += devicesPerRequest
|
|
116
|
-
ignorePercentage || console.log(`PROGRESS_PERC:${currentDeviceCount / totalDevices * 100}`)
|
|
116
|
+
ignorePercentage || console.log(`PROGRESS_PERC:${Math.round(currentDeviceCount / totalDevices * 100)}`)
|
|
117
117
|
}
|
|
118
|
-
console.log(_chunk.map(d =>
|
|
118
|
+
console.log('done devices', _chunk.map(d => d.id), 'position count:', x.route && x.route.length)
|
|
119
119
|
return x
|
|
120
120
|
}))
|
|
121
121
|
}
|
|
@@ -124,7 +124,7 @@ async function getAllInOne (
|
|
|
124
124
|
try {
|
|
125
125
|
result.push(...(await Promise.all(requests)))
|
|
126
126
|
} catch (e) {
|
|
127
|
-
console.log('parallel', e.message, e.config
|
|
127
|
+
console.log('parallel', e.message, e.config)
|
|
128
128
|
}
|
|
129
129
|
console.log('took', new Date() - now, 'ms')
|
|
130
130
|
}
|
package/src/zone-report.js
CHANGED
|
@@ -23,7 +23,7 @@ const { checkGeofenceIn } = require('./util/geofence')
|
|
|
23
23
|
const { parallel } = require('./util/parallel')
|
|
24
24
|
const { getDataByDay } = require('./util/trips')
|
|
25
25
|
const axios = require('axios').default
|
|
26
|
-
const sliceSize =
|
|
26
|
+
const sliceSize = 3
|
|
27
27
|
const fileName = 'ZoneReport'
|
|
28
28
|
|
|
29
29
|
async function createZoneReport (from, to, userData, traccar) {
|