repositories
/
poolifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee9f0ad
)
fix: emit error event if a dynamic worker destroy fails
author
Jérôme Benoit
<jerome.benoit@sap.com>
Mon, 14 Aug 2023 20:25:51 +0000
(22:25 +0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Mon, 14 Aug 2023 20:25:51 +0000
(22:25 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/pools/abstract-pool.ts
b/src/pools/abstract-pool.ts
index f76ad2f55bf4326383077456d7414aa8c023ea2e..2a52d5486984133e620552877e90921d50d96190 100644
(file)
--- a/
src/pools/abstract-pool.ts
+++ b/
src/pools/abstract-pool.ts
@@
-958,7
+958,9
@@
export abstract class AbstractPool<
workerUsage.tasks.executing === 0 &&
this.tasksQueueSize(localWorkerNodeKey) === 0)))
) {
- this.destroyWorkerNode(localWorkerNodeKey).catch(EMPTY_FUNCTION)
+ this.destroyWorkerNode(localWorkerNodeKey).catch((error) => {
+ this.emitter?.emit(PoolEvents.error, error)
+ })
}
})
const workerInfo = this.getWorkerInfo(workerNodeKey)