repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: cover new pool methods
[poolifier.git]
/
src
/
pools
/
abstract-pool.ts
diff --git
a/src/pools/abstract-pool.ts
b/src/pools/abstract-pool.ts
index 3d10391c17748cdd63473c4afae7630665023008..7be2cef51c8f11646b5f43174de7abe3ea43a82c 100644
(file)
--- a/
src/pools/abstract-pool.ts
+++ b/
src/pools/abstract-pool.ts
@@
-858,6
+858,11
@@
export abstract class AbstractPool<
/** @inheritDoc */
public async removeTaskFunction (name: string): Promise<boolean> {
/** @inheritDoc */
public async removeTaskFunction (name: string): Promise<boolean> {
+ if (!this.taskFunctions.has(name)) {
+ throw new Error(
+ 'Cannot remove a task function that does not exist on the pool side'
+ )
+ }
this.taskFunctions.delete(name)
return await this.sendTaskFunctionOperationToWorkers({
taskFunctionOperation: 'remove',
this.taskFunctions.delete(name)
return await this.sendTaskFunctionOperationToWorkers({
taskFunctionOperation: 'remove',