repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of github.com:poolifier/poolifier
[poolifier.git]
/
src
/
worker
/
cluster-worker.ts
diff --git
a/src/worker/cluster-worker.ts
b/src/worker/cluster-worker.ts
index 1f9895d6e37b25a73911cd84f1c1f6f7404a98b8..201a516c56e1d8ab2a3d2d569c4d54d7f0fd484d 100644
(file)
--- a/
src/worker/cluster-worker.ts
+++ b/
src/worker/cluster-worker.ts
@@
-48,14
+48,12
@@
export class ClusterWorker<
this.getMainWorker().on('message', this.messageListener.bind(this))
this.sendToMainWorker({
ready: true,
this.getMainWorker().on('message', this.messageListener.bind(this))
this.sendToMainWorker({
ready: true,
- taskFunctionNames: this.listTaskFunctionNames(),
- workerId: this.id
+ taskFunctionNames: this.listTaskFunctionNames()
})
} catch {
this.sendToMainWorker({
ready: false,
})
} catch {
this.sendToMainWorker({
ready: false,
- taskFunctionNames: this.listTaskFunctionNames(),
- workerId: this.id
+ taskFunctionNames: this.listTaskFunctionNames()
})
}
}
})
}
}
@@
-68,6
+66,6
@@
export class ClusterWorker<
/** @inheritDoc */
protected sendToMainWorker (message: MessageValue<Response>): void {
/** @inheritDoc */
protected sendToMainWorker (message: MessageValue<Response>): void {
- this.getMainWorker().send(
message
)
+ this.getMainWorker().send(
{ ...message, workerId: this.id }
)
}
}
}
}