From e7730ecc57984719d149b4dd86b3bd164636f19e Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:09:14 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- benchmarks/benchmarks-utils.cjs | 8 ++++---- src/pools/worker-node.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/benchmarks/benchmarks-utils.cjs b/benchmarks/benchmarks-utils.cjs index 30eb1e2b..2f401e80 100644 --- a/benchmarks/benchmarks-utils.cjs +++ b/benchmarks/benchmarks-utils.cjs @@ -76,12 +76,12 @@ const readWriteFiles = ( const executeTaskFunction = data => { switch (data.function) { - case TaskFunctions.jsonIntegerSerialization: - return jsonIntegerSerialization(data.taskSize || 1000) - case TaskFunctions.fibonacci: - return fibonacci(data.taskSize || 1000) case TaskFunctions.factorial: return factorial(data.taskSize || 1000) + case TaskFunctions.fibonacci: + return fibonacci(data.taskSize || 1000) + case TaskFunctions.jsonIntegerSerialization: + return jsonIntegerSerialization(data.taskSize || 1000) case TaskFunctions.readWriteFiles: return readWriteFiles(data.taskSize || 1000) default: diff --git a/src/pools/worker-node.ts b/src/pools/worker-node.ts index 1a1f207b..73160a25 100644 --- a/src/pools/worker-node.ts +++ b/src/pools/worker-node.ts @@ -298,16 +298,16 @@ export class WorkerNode this.closeMessageChannel() this.removeAllListeners() switch (this.info.type) { - case WorkerTypes.thread: - this.worker.unref?.() - await this.worker.terminate?.() - break case WorkerTypes.cluster: this.registerOnceWorkerEventHandler('disconnect', () => { this.worker.kill?.() }) this.worker.disconnect?.() break + case WorkerTypes.thread: + this.worker.unref?.() + await this.worker.terminate?.() + break } await waitWorkerExit } -- 2.34.1