@nxtedition/lib 21.3.8 → 21.3.10

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/app.js CHANGED
@@ -281,9 +281,9 @@ export function makeApp(appConfig, onTerminate) {
281
281
  histogram.reset()
282
282
 
283
283
  if (currentLag > 1e3) {
284
- logger?.error({ currentLag }, 'lag')
284
+ logger?.error({ currentLag, elapsedTime: currentLag }, 'lag')
285
285
  } else if (currentLag > maxLag) {
286
- logger?.warn({ currentLag }, 'lag')
286
+ logger?.warn({ currentLag, elapsedTime: currentLag }, 'lag')
287
287
  }
288
288
 
289
289
  currentLag$.next(currentLag)
package/couch.js CHANGED
@@ -1059,7 +1059,7 @@ class PromiseOutput {
1059
1059
 
1060
1060
  const defaultDispatcher = new Agent({
1061
1061
  pipelining: 4,
1062
- connections: 32,
1062
+ connections: 8,
1063
1063
  })
1064
1064
 
1065
1065
  export function request(url, opts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "21.3.8",
3
+ "version": "21.3.10",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
package/timers.js CHANGED
@@ -40,8 +40,8 @@ function refreshTimeout() {
40
40
  if (fastNowTimeout && fastNowTimeout.refresh) {
41
41
  fastNowTimeout.refresh()
42
42
  } else {
43
- clearTimeout(fastNowTimeout)
44
- fastNowTimeout = setTimeout(onTimeout, 500)
43
+ global.clearTimeout(fastNowTimeout)
44
+ fastNowTimeout = global.setTimeout(onTimeout, 500)
45
45
  if (fastNowTimeout.unref) {
46
46
  fastNowTimeout.unref()
47
47
  }
@@ -80,13 +80,15 @@ class Timeout {
80
80
  }
81
81
 
82
82
  export function setTimeout(callback, delay, opaque) {
83
- return delay < 1e3 ? setTimeout(callback, delay, opaque) : new Timeout(callback, delay, opaque)
83
+ return delay < 1e3
84
+ ? global.setTimeout(callback, delay, opaque)
85
+ : new Timeout(callback, delay, opaque)
84
86
  }
85
87
 
86
88
  export function clearTimeout(timeout) {
87
89
  if (timeout instanceof Timeout) {
88
90
  timeout.clear()
89
- } else {
90
- clearTimeout(timeout)
91
+ } else if (timeout == null) {
92
+ global.clearTimeout(timeout)
91
93
  }
92
94
  }