- } else if (message.workerId === this.id) {
- if (message.statistics != null) {
- // Statistics message received
- this.statistics = message.statistics
- } else if (message.checkActive != null) {
- // Check active message received
- message.checkActive ? this.startCheckActive() : this.stopCheckActive()
- } else if (message.taskId != null && message.data != null) {
- // Task message received
- this.run(message)
- } else if (message.kill === true) {
- // Kill message received
- this.handleKillMessage(message)
- }
+ }
+ if (message.statistics != null) {
+ // Statistics message received
+ this.statistics = message.statistics
+ } else if (message.checkActive != null) {
+ // Check active message received
+ message.checkActive ? this.startCheckActive() : this.stopCheckActive()
+ } else if (message.taskId != null && message.data != null) {
+ // Task message received
+ this.run(message)
+ } else if (message.kill === true) {
+ // Kill message received
+ this.handleKillMessage(message)