+ return true
+ }
+ }
+ return false
+ }
+
+ /** @inheritDoc */
+ public addTaskFunction (name: string, taskFunction: TaskFunction): boolean {
+ this.sendToWorkers({
+ taskFunctionOperation: 'add',
+ taskFunctionName: name,
+ taskFunction: taskFunction.toString()
+ })
+ return true
+ }
+
+ /** @inheritDoc */
+ public removeTaskFunction (name: string): boolean {
+ this.sendToWorkers({
+ taskFunctionOperation: 'remove',
+ taskFunctionName: name
+ })
+ return true
+ }
+
+ /** @inheritDoc */
+ public listTaskFunctionNames (): string[] {
+ for (const workerNode of this.workerNodes) {
+ if (
+ Array.isArray(workerNode.info.taskFunctionNames) &&
+ workerNode.info.taskFunctionNames.length > 0
+ ) {
+ return workerNode.info.taskFunctionNames