repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): apply updates
[poolifier.git]
/
src
/
worker
/
abstract-worker.ts
diff --git
a/src/worker/abstract-worker.ts
b/src/worker/abstract-worker.ts
index ec77ccab8d68c7990339b9331cf6fd4903a7d1fe..ebbefc75ba4cc8c4e09bcc3073e372085466c181 100644
(file)
--- a/
src/worker/abstract-worker.ts
+++ b/
src/worker/abstract-worker.ts
@@
-78,7
+78,6
@@
export abstract class AbstractWorker<
/**
* Handler id of the `activeInterval` worker activity check.
*/
/**
* Handler id of the `activeInterval` worker activity check.
*/
- // eslint-disable-next-line no-undef
protected activeInterval?: NodeJS.Timeout
/**
protected activeInterval?: NodeJS.Timeout
/**
@@
-378,15
+377,16
@@
export abstract class AbstractWorker<
response = { status: false, error: new Error('Unknown task operation') }
break
}
response = { status: false, error: new Error('Unknown task operation') }
break
}
+ const { status, error } = response
this.sendToMainWorker({
taskFunctionOperation,
this.sendToMainWorker({
taskFunctionOperation,
- taskFunctionOperationStatus:
response.
status,
+ taskFunctionOperationStatus: status,
taskFunctionProperties,
taskFunctionProperties,
- ...(!
response.
status &&
-
response.
error != null && {
+ ...(!status &&
+ error != null && {
workerError: {
name: taskFunctionProperties.name,
workerError: {
name: taskFunctionProperties.name,
- message: this.handleError(
response.
error as Error | string),
+ message: this.handleError(error as Error | string),
},
}),
})
},
}),
})