fleetmap-reports 1.0.749 → 1.0.751
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/trip-report.js +1 -0
- package/src/util/parallel.js +1 -1
package/package.json
CHANGED
package/src/trip-report.js
CHANGED
|
@@ -114,6 +114,7 @@ async function createTripReportByGroup (from, to, userData, traccar) {
|
|
|
114
114
|
async function createTripReportByDriver (from, to, userData, traccar) {
|
|
115
115
|
const devices = await traccar.devices.devicesGet().then(d => d.data)
|
|
116
116
|
console.log(devices.length, 'devices')
|
|
117
|
+
console.log('drivers', userData.drivers)
|
|
117
118
|
|
|
118
119
|
if (!devices.length) {
|
|
119
120
|
// Empty report
|
package/src/util/parallel.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.parallel = (report, method, toSlice, ...args) => {
|
|
|
8
8
|
if (cluster.isPrimary) {
|
|
9
9
|
console.log('master', process.pid, 'is running', process.cwd(), 'with', numCPUs, 'cpus')
|
|
10
10
|
cluster.setupPrimary({ exec: path.resolve(__dirname, 'worker.js') })
|
|
11
|
-
const sliced = toSlice.length > (numCPUs - 1) ? sliceArray(toSlice, toSlice.length / (numCPUs - 1)) : toSlice
|
|
11
|
+
const sliced = toSlice.length > (numCPUs - 1) ? sliceArray(toSlice, toSlice.length / (numCPUs - 1)) : [toSlice]
|
|
12
12
|
const _result = []
|
|
13
13
|
let done = 0
|
|
14
14
|
let workerCount = 0
|