fleetmap-reports 2.0.271 → 2.0.273
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/speeding-report.js +1 -1
- package/src/util/traccar.js +3 -2
package/package.json
CHANGED
package/src/speeding-report.js
CHANGED
|
@@ -79,7 +79,7 @@ function processServerSide () {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
async function getOverspeedEvents (from, to, userData, devices, allData, traccarInstance) {
|
|
82
|
-
const _sliced = automaticReports.sliceArray(automaticReports.sliceArray(devices,
|
|
82
|
+
const _sliced = automaticReports.sliceArray(automaticReports.sliceArray(devices, 5), 5)
|
|
83
83
|
let deviceCount = 0
|
|
84
84
|
const overspeedEvents = []
|
|
85
85
|
for (const sliced of _sliced) {
|
package/src/util/traccar.js
CHANGED
|
@@ -2,6 +2,9 @@ const automaticReports = require('../automaticReports')
|
|
|
2
2
|
const { convertFromUTC, isClientSide, convertFromLocal } = require('./utils')
|
|
3
3
|
const path = require('path')
|
|
4
4
|
const { cleanPositions, filterPosition } = require('./route')
|
|
5
|
+
const Piscina = require('piscina')
|
|
6
|
+
const piscina = new Piscina()
|
|
7
|
+
|
|
5
8
|
async function getRoute (traccar, from, to, devices) {
|
|
6
9
|
const devicesToSlice = devices.slice()
|
|
7
10
|
|
|
@@ -106,8 +109,6 @@ function getCookie (traccar) {
|
|
|
106
109
|
|
|
107
110
|
function streamJson (traccar, u, filter) {
|
|
108
111
|
const cookie = getCookie(traccar)
|
|
109
|
-
const Piscina = require('piscina')
|
|
110
|
-
const piscina = new Piscina()
|
|
111
112
|
return piscina.run({
|
|
112
113
|
url: traccar.axios.defaults.baseURL + u,
|
|
113
114
|
cookie,
|