@autofleet/node-common 1.3.3 → 1.4.8

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": "@autofleet/node-common",
3
- "version": "1.3.3",
3
+ "version": "1.4.8",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "coverage": "jest --coverage --forceExit --runInBand",
package/settings/index.js CHANGED
@@ -4,6 +4,10 @@ const Network = require('../network');
4
4
  const Logger = require('../logger');
5
5
  const keysMap = require('./map');
6
6
 
7
+ const util = require('util');
8
+
9
+ const nextTick = util.promisify(process.nextTick);
10
+
7
11
  const logger = Logger();
8
12
  require('dotenv').config();
9
13
 
@@ -54,6 +58,7 @@ class SettingsManager {
54
58
  const cacheValue = this.settingsCache.get(cacheKey);
55
59
  if (cacheValue !== undefined) {
56
60
  if (waitingToNetwork === cacheValue) {
61
+ await nextTick();
57
62
  return new Promise((resolve) => {
58
63
  this.networkEvents.once(cacheKey, (networkValue) => {
59
64
  resolve(SettingsManager.readNetworkValue(networkValue, defaultValue));
package/settings/map.js CHANGED
@@ -409,4 +409,18 @@ module.exports = {
409
409
  defaultValue: 1,
410
410
  context: 'matching',
411
411
  },
412
+ 'matching.pooling.maxDrift': {
413
+ name: 'Max drift for pooling matching',
414
+ description: '',
415
+ type: 'number',
416
+ defaultValue: 6,
417
+ context: 'matching',
418
+ },
419
+ 'matching.pooling.maxEta': {
420
+ name: 'Max eta for pooling matching',
421
+ description: '',
422
+ type: 'number',
423
+ defaultValue: 15,
424
+ context: 'matching',
425
+ },
412
426
  };