fleetmap-reports 2.0.252 → 2.0.253

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.252",
3
+ "version": "2.0.253",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,9 +1,8 @@
1
1
  const automaticReports = require('../automaticReports')
2
2
  const { convertFromUTC, isClientSide, convertFromLocal } = require('./utils')
3
3
  const path = require('path')
4
- const Piscina = require('piscina')
5
4
  const { cleanPositions, filterPosition } = require('./route')
6
- const piscina = new Piscina()
5
+ const Piscina = require("piscina");
7
6
  async function getRoute (traccar, from, to, devices) {
8
7
  const devicesToSlice = devices.slice()
9
8
 
@@ -108,6 +107,8 @@ function getCookie (traccar) {
108
107
 
109
108
  function streamJson (traccar, u, filter) {
110
109
  const cookie = getCookie(traccar)
110
+ const Piscina = require('piscina')
111
+ const piscina = new Piscina()
111
112
  return piscina.run({
112
113
  url: traccar.axios.defaults.baseURL + u,
113
114
  cookie,