@nxtedition/lib 26.0.31 → 26.0.32
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 +7 -1
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -348,7 +348,13 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
348
348
|
let indices = []
|
|
349
349
|
if (Number.isInteger(appConfig.affinity)) {
|
|
350
350
|
indices = [appConfig.affinity % allNodes.length]
|
|
351
|
-
} else if (
|
|
351
|
+
} else if (
|
|
352
|
+
appConfig.affinity == null ||
|
|
353
|
+
appConfig.affinity === true ||
|
|
354
|
+
appConfig.affinity === 'auto' ||
|
|
355
|
+
appConfig.affinity === 'hash' ||
|
|
356
|
+
appConfig.affinity === 'default'
|
|
357
|
+
) {
|
|
352
358
|
indices = [hashString(serviceName) % allNodes.length]
|
|
353
359
|
} else {
|
|
354
360
|
throw new Error('invalid affinity configuration: ' + appConfig.affinity)
|