fleetmap-reports 2.0.280 → 2.0.282

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.280",
3
+ "version": "2.0.282",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -51,10 +51,10 @@ async function createLocationReportByDriver (from, to, userData, traccar) {
51
51
 
52
52
  const deviceCount = 0
53
53
  const results = []
54
- const batchSize = 5
54
+ const batchSize = 50
55
55
  for (let i = 0; i < devices.length; i += batchSize) {
56
56
  const batch = devices.slice(i, i + batchSize)
57
- const batchResults = await Promise.all(batch.map(device => getDriverRoute(traccar, from, to, [device], deviceCount, devices, userData)))
57
+ const batchResults = await Promise.all(batch.map(device => _getDriverRoute(traccar, from, to, [device], deviceCount, devices, userData)))
58
58
  const filtered = batchResults.filter(r => r && r.length)
59
59
  console.log(i, '/', devices.length, 'pushing', filtered, batchResults)
60
60
  filtered.forEach(r => {