@autofleet/node-common 1.3.7 → 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.7",
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
@@ -410,14 +410,14 @@ module.exports = {
410
410
  context: 'matching',
411
411
  },
412
412
  'matching.pooling.maxDrift': {
413
- name: 'Max drift for matching',
413
+ name: 'Max drift for pooling matching',
414
414
  description: '',
415
415
  type: 'number',
416
416
  defaultValue: 6,
417
417
  context: 'matching',
418
418
  },
419
419
  'matching.pooling.maxEta': {
420
- name: 'Max eta for matching',
420
+ name: 'Max eta for pooling matching',
421
421
  description: '',
422
422
  type: 'number',
423
423
  defaultValue: 15,