From: Jérôme Benoit Date: Sat, 6 May 2023 20:06:40 +0000 (+0200) Subject: fix: silence sonar code smell X-Git-Tag: v2.4.12~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4c0ada52750183cd0fb1d5e26b6be7d80d042051;hp=0682ba158c6af9ffc453f38bd7d16438eab97695;p=poolifier.git fix: silence sonar code smell Signed-off-by: Jérôme Benoit --- diff --git a/README.md b/README.md index cd882833..07bcdb10 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ Node versions >= 16.x are supported. Properties: - `medRunTime` (optional) - Use the tasks median run time instead of the tasks average run time in worker choice strategies. - - `weights` (optional) - The weights to use in the weighted round robin worker choice strategy: `{ workerNodeKey: weight, ...}` + - `weights` (optional) - The worker weights to use in the weighted round robin worker choice strategy: `{ 0: 200, 1: 300, ..., n: 100 }` Default: `{ medRunTime: false }` diff --git a/src/utility-types.ts b/src/utility-types.ts index 331085fe..08861ebd 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -19,7 +19,7 @@ export type Draft = { -readonly [P in keyof T]?: T[P] } */ export interface MessageValue< Data = unknown, - MainWorker extends ClusterWorker | MessagePort | unknown = unknown + MainWorker extends ClusterWorker | MessagePort = ClusterWorker | MessagePort > extends Task { /** * Kill code.