repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: refine pool statuses handling
[poolifier.git]
/
src
/
pools
/
abstract-pool.ts
diff --git
a/src/pools/abstract-pool.ts
b/src/pools/abstract-pool.ts
index c8d4551167d28d0bcf64cf3e7afb082dff53841d..b72d8cbcb4c3354294dda16718a6d229e64d04e0 100644
(file)
--- a/
src/pools/abstract-pool.ts
+++ b/
src/pools/abstract-pool.ts
@@
-1224,7
+1224,6
@@
export abstract class AbstractPool<
this.emitter?.emit(PoolEvents.error, error)
if (
this.started &&
this.emitter?.emit(PoolEvents.error, error)
if (
this.started &&
- !this.starting &&
!this.destroying &&
this.opts.restartWorkerOnError === true
) {
!this.destroying &&
this.opts.restartWorkerOnError === true
) {
@@
-1234,7
+1233,11
@@
export abstract class AbstractPool<
this.createAndSetupWorkerNode()
}
}
this.createAndSetupWorkerNode()
}
}
- if (this.started && this.opts.enableTasksQueue === true) {
+ if (
+ this.started &&
+ !this.destroying &&
+ this.opts.enableTasksQueue === true
+ ) {
this.redistributeQueuedTasks(this.workerNodes.indexOf(workerNode))
}
workerNode?.terminate().catch(error => {
this.redistributeQueuedTasks(this.workerNodes.indexOf(workerNode))
}
workerNode?.terminate().catch(error => {