- this.executeTask(
- destinationWorkerNodeKey,
- this.dequeueTask(destinationWorkerNodeKey) as Task<Data>
- )
+ this.executeTask(destinationWorkerNodeKey, task)
+ } else {
+ this.enqueueTask(destinationWorkerNodeKey, task)
+ }
+ if (destinationWorkerNode?.usage != null) {
+ ++destinationWorkerNode.usage.tasks.stolen
+ }
+ if (
+ this.shallUpdateTaskFunctionWorkerUsage(destinationWorkerNodeKey) &&
+ destinationWorkerNode.getTaskFunctionWorkerUsage(
+ task.name as string
+ ) != null
+ ) {
+ const taskFunctionWorkerUsage =
+ destinationWorkerNode.getTaskFunctionWorkerUsage(
+ task.name as string
+ ) as WorkerUsage
+ ++taskFunctionWorkerUsage.tasks.stolen