fleetmap-reports 2.0.271 → 2.0.272
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 +3 -2
package/package.json
CHANGED
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,
|