fleetmap-reports 1.0.541 → 1.0.543
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/zone-report.js +3 -1
package/package.json
CHANGED
package/src/zone-report.js
CHANGED
|
@@ -12,7 +12,7 @@ const booleanPointInPolygon = require('@turf/boolean-point-in-polygon')
|
|
|
12
12
|
const distance = require('@turf/distance')
|
|
13
13
|
const axios = require('axios')
|
|
14
14
|
const { processServerSide } = require('./util')
|
|
15
|
-
const sliceSize =
|
|
15
|
+
const sliceSize = 1000
|
|
16
16
|
const fileName = 'ZoneReport'
|
|
17
17
|
|
|
18
18
|
async function createZoneReport (from, to, userData, traccar) {
|
|
@@ -103,7 +103,9 @@ async function getAllInOne (
|
|
|
103
103
|
const sliced = automaticReports.sliceArray(devices, sliceSize)
|
|
104
104
|
const result = []
|
|
105
105
|
console.log('getAll, slicing', sliceSize)
|
|
106
|
+
let iteration = 0
|
|
106
107
|
for (const chunk of sliced) {
|
|
108
|
+
console.log('iteration', ++iteration)
|
|
107
109
|
const requests = []
|
|
108
110
|
for (const _chunk of automaticReports.sliceArray(chunk, devicesPerRequest)) {
|
|
109
111
|
const u = url + '&' + _chunk.map(d => `deviceId=${d.id}`).join('&')
|