fleetmap-reports 2.0.185 → 2.0.187

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.185",
3
+ "version": "2.0.187",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -99,6 +99,13 @@ async function getAllInOne (
99
99
  jar: traccar.cookieJar,
100
100
  withCredentials: true,
101
101
  timeout: 900000
102
+ }).catch(e => {
103
+ console.log(e.message, 'try again', u)
104
+ return traccar.axios.get(u, {
105
+ jar: traccar.cookieJar,
106
+ withCredentials: true,
107
+ timeout: 900000
108
+ })
102
109
  }).then(r => r.data).then(x => {
103
110
  console.log('LOADING_MESSAGE:' + _chunk[0].name)
104
111
  if (counter) {
@@ -117,7 +124,7 @@ async function getAllInOne (
117
124
  try {
118
125
  result.push(...(await Promise.all(requests)))
119
126
  } catch (e) {
120
- console.log(e)
127
+ console.log('parallel', e)
121
128
  }
122
129
  console.log('took', new Date() - now, 'ms')
123
130
  }
@@ -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 = 50
26
+ const sliceSize = 25
27
27
  const deviceChunk = 5
28
28
  const fileName = 'ZoneReport'
29
29