repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #871 from poolifier/dependabot/npm_and_yarn/examples/typescript...
[poolifier.git]
/
src
/
pools
/
cluster
/
fixed.ts
diff --git
a/src/pools/cluster/fixed.ts
b/src/pools/cluster/fixed.ts
index 8e264359b2ceed7a5efeab91d1488112b4f1dcb7..c7c95c4b3dad537b39dfd44d37481178035fcb4c 100644
(file)
--- a/
src/pools/cluster/fixed.ts
+++ b/
src/pools/cluster/fixed.ts
@@
-64,7
+64,7
@@
export class FixedClusterPool<
this.flushTasksQueue(workerNodeKey)
// FIXME: wait for tasks to be finished
const worker = this.workerNodes[workerNodeKey].worker
this.flushTasksQueue(workerNodeKey)
// FIXME: wait for tasks to be finished
const worker = this.workerNodes[workerNodeKey].worker
- const w
orkerExitPromise = new Promise<void>(resolve
=> {
+ const w
aitWorkerExit = new Promise<void>((resolve)
=> {
worker.on('exit', () => {
resolve()
})
worker.on('exit', () => {
resolve()
})
@@
-72,9
+72,9
@@
export class FixedClusterPool<
worker.on('disconnect', () => {
worker.kill()
})
worker.on('disconnect', () => {
worker.kill()
})
-
this.sendToWorker(workerNodeKey, { kill: true, workerId: worker.id }
)
+
await this.sendKillMessageToWorker(workerNodeKey, worker.id
)
worker.disconnect()
worker.disconnect()
- await w
orkerExitPromise
+ await w
aitWorkerExit
}
/** @inheritDoc */
}
/** @inheritDoc */
@@
-116,16
+116,6
@@
export class FixedClusterPool<
return WorkerTypes.cluster
}
return WorkerTypes.cluster
}
- /** @inheritDoc */
- protected get minSize (): number {
- return this.numberOfWorkers
- }
-
- /** @inheritDoc */
- protected get maxSize (): number {
- return this.numberOfWorkers
- }
-
/** @inheritDoc */
protected get busy (): boolean {
return this.internalBusy()
/** @inheritDoc */
protected get busy (): boolean {
return this.internalBusy()