fleetmap-reports 2.0.205 → 2.0.207
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 -2
- package/src/zone-report.js +1 -1
package/package.json
CHANGED
package/src/util/traccar.js
CHANGED
|
@@ -97,7 +97,8 @@ async function getItems (traccar, u, _chunk, counter, devicesPerRequest, ignoreP
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
async function streamJson (traccar, u) {
|
|
100
|
-
|
|
100
|
+
const now = new Date()
|
|
101
|
+
console.log(traccar.axios.defaults.baseURL, u)
|
|
101
102
|
const response = await traccar.axios.get(u, {
|
|
102
103
|
responseType: 'stream',
|
|
103
104
|
jar: traccar.cookieJar,
|
|
@@ -105,7 +106,8 @@ async function streamJson (traccar, u) {
|
|
|
105
106
|
})
|
|
106
107
|
|
|
107
108
|
const result = { route: [] }
|
|
108
|
-
|
|
109
|
+
const requestId = response.headers['x-amzn-requestid']
|
|
110
|
+
console.log(u, 'x-amzn-requestid', requestId, 'took', new Date() - now, 'ms', 'streaming...')
|
|
109
111
|
return new Promise((resolve, reject) => {
|
|
110
112
|
const pipeline = chain([
|
|
111
113
|
response.data,
|
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 = 25
|
|
27
27
|
const deviceChunk = 5
|
|
28
28
|
const fileName = 'ZoneReport'
|
|
29
29
|
|