fleetmap-reports 2.0.178 → 2.0.180
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/parallel.js +1 -1
- package/src/zone-report.js +2 -2
package/package.json
CHANGED
package/src/util/parallel.js
CHANGED
|
@@ -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,
|
package/src/zone-report.js
CHANGED
|
@@ -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
|
-
|
|
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)
|
|
@@ -482,7 +482,7 @@ function analyseAlerts (alerts, deviceRoute, userData, from, to, device) {
|
|
|
482
482
|
async function getInAndOutEvents (devices, route, userData) {
|
|
483
483
|
const events = []
|
|
484
484
|
const geofencesFeatures = userData.geofences.map(g => convertToFeature(g))
|
|
485
|
-
|
|
485
|
+
console.log('getInAndOutEvents', devices)
|
|
486
486
|
devices.forEach(d => {
|
|
487
487
|
const deviceRoute = route.filter(p => p.deviceId === d.id)
|
|
488
488
|
const routePoints = deviceRoute.sort(sortPositions).map(p => convertPositionToFeature(p))
|