@nxtedition/lib 26.0.34 → 26.0.36
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 +10 -5
- package/package.json +7 -8
package/app.js
CHANGED
|
@@ -37,9 +37,8 @@ import { isTimeBetween } from './time.js'
|
|
|
37
37
|
import makeUnderPressure from './under-pressure.js'
|
|
38
38
|
import undici from '@nxtedition/undici'
|
|
39
39
|
import { isPrimary } from 'node:cluster'
|
|
40
|
-
import { nice } from '@napi-rs/nice'
|
|
41
40
|
import path from 'node:path'
|
|
42
|
-
import { sched_getaffinity, sched_setaffinity } from '@nxtedition/sched'
|
|
41
|
+
import { nice, sched_getaffinity, sched_setaffinity } from '@nxtedition/sched'
|
|
43
42
|
|
|
44
43
|
export function makeApp(appConfig, onTerminate) {
|
|
45
44
|
let ds
|
|
@@ -355,19 +354,25 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
355
354
|
) {
|
|
356
355
|
indices = [hashString(JSON.stringify({ serviceName, serviceModule })) % allNodes.length]
|
|
357
356
|
} else {
|
|
358
|
-
throw new Error('invalid numa configuration: ' + numa)
|
|
357
|
+
throw Object.assign(new Error('invalid numa configuration: ' + numa), {
|
|
358
|
+
data: { numa, allNodes },
|
|
359
|
+
})
|
|
359
360
|
}
|
|
360
361
|
|
|
362
|
+
const prev = sched_getaffinity(0)
|
|
363
|
+
|
|
361
364
|
affinity = indices.flatMap((i) => allNodes[i] ?? [])
|
|
362
365
|
affinity = fp.uniq(affinity)
|
|
363
|
-
affinity = fp.intersection(affinity,
|
|
366
|
+
affinity = fp.intersection(affinity, prev)
|
|
364
367
|
|
|
365
368
|
if (
|
|
366
369
|
!Array.isArray(affinity) ||
|
|
367
370
|
affinity.length === 0 ||
|
|
368
371
|
affinity.some((x) => !Number.isInteger(x) || x < 0)
|
|
369
372
|
) {
|
|
370
|
-
throw new Error('invalid numa configuration:
|
|
373
|
+
throw Object.assign(new Error('invalid numa configuration:' + numa), {
|
|
374
|
+
data: { numa, allNodes, indices, next: affinity, prev },
|
|
375
|
+
})
|
|
371
376
|
}
|
|
372
377
|
|
|
373
378
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/lib",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.36",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Robert Nagy <robert.nagy@boffins.se>",
|
|
6
6
|
"type": "module",
|
|
@@ -66,9 +66,8 @@
|
|
|
66
66
|
"@aws-sdk/client-s3": "3.873.0",
|
|
67
67
|
"@elastic/elasticsearch": "^8.17.1",
|
|
68
68
|
"@elastic/transport": "^8.9.3",
|
|
69
|
-
"@napi-rs/nice": "^1.1.1",
|
|
70
69
|
"@nxtedition/nxt-undici": "^6.4.0",
|
|
71
|
-
"@nxtedition/sched": "^1.0.
|
|
70
|
+
"@nxtedition/sched": "^1.0.2",
|
|
72
71
|
"@smithy/node-http-handler": "^4.1.1",
|
|
73
72
|
"acorn": "^8.15.0",
|
|
74
73
|
"astring": "^1.9.0",
|
|
@@ -86,7 +85,7 @@
|
|
|
86
85
|
"nconf": "^0.13.0",
|
|
87
86
|
"object-hash": "^3.0.0",
|
|
88
87
|
"p-queue": "^8.0.1",
|
|
89
|
-
"pino": "^9.
|
|
88
|
+
"pino": "^9.11.0",
|
|
90
89
|
"qs": "^6.14.0",
|
|
91
90
|
"request-target": "^1.0.2",
|
|
92
91
|
"smpte-timecode": "^1.3.6",
|
|
@@ -100,19 +99,19 @@
|
|
|
100
99
|
"@types/lodash": "^4.17.20",
|
|
101
100
|
"@types/node": "^24.3.0",
|
|
102
101
|
"canvas": "^3.1.0",
|
|
103
|
-
"eslint": "^9.
|
|
102
|
+
"eslint": "^9.36.0",
|
|
104
103
|
"eslint-config-prettier": "^10.1.8",
|
|
105
104
|
"eslint-config-standard": "^17.0.0",
|
|
106
105
|
"eslint-plugin-import": "^2.32.0",
|
|
107
|
-
"eslint-plugin-n": "^17.
|
|
106
|
+
"eslint-plugin-n": "^17.23.1",
|
|
108
107
|
"eslint-plugin-node": "^11.1.0",
|
|
109
108
|
"eslint-plugin-promise": "^7.2.1",
|
|
110
109
|
"husky": "^9.1.7",
|
|
111
|
-
"lint-staged": "^16.
|
|
110
|
+
"lint-staged": "^16.2.0",
|
|
112
111
|
"prettier": "^3.6.2",
|
|
113
112
|
"rxjs": "^7.8.2",
|
|
114
113
|
"typescript": "^5.9.2",
|
|
115
|
-
"typescript-eslint": "^8.
|
|
114
|
+
"typescript-eslint": "^8.44.1"
|
|
116
115
|
},
|
|
117
116
|
"peerDependencies": {
|
|
118
117
|
"@elastic/elasticsearch": "^8.6.0",
|