@nxtedition/lib 19.8.18 → 19.8.20

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.
Files changed (2) hide show
  1. package/app.js +1 -10
  2. package/package.json +1 -1
package/app.js CHANGED
@@ -22,6 +22,7 @@ import { makeTrace } from './trace.js'
22
22
  import compose from 'koa-compose'
23
23
  import { createServer } from './http.js'
24
24
  import { json } from 'node:stream/consumers'
25
+ import { monitorEventLoopDelay } from 'node:perf_hooks'
25
26
 
26
27
  export function makeApp(appConfig, onTerminate) {
27
28
  let ds
@@ -218,8 +219,6 @@ export function makeApp(appConfig, onTerminate) {
218
219
  let toobusy
219
220
 
220
221
  if (appConfig.toobusy) {
221
- const { monitorEventLoopDelay } = require('node:perf_hooks')
222
-
223
222
  const resolution = 10
224
223
  const interval = 500
225
224
  const maxLag = 70
@@ -245,14 +244,6 @@ export function makeApp(appConfig, onTerminate) {
245
244
 
246
245
  toobusy = () => currentLag > maxLag
247
246
  toobusy.lag = () => currentLag
248
-
249
- toobusy.onLag((currentLag) => {
250
- if (currentLag > 1e3) {
251
- logger.error({ currentLag }, 'lag')
252
- } else {
253
- logger.warn({ currentLag }, 'lag')
254
- }
255
- })
256
247
  }
257
248
 
258
249
  if (appConfig.couchdb || appConfig.couch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "19.8.18",
3
+ "version": "19.8.20",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",