* Set the state of the process. * * @param state State to set.
(state: ProcessState)
| 201 | * @param state State to set. |
| 202 | */ |
| 203 | private setState(state: ProcessState): void { |
| 204 | if (this.state !== state) { |
| 205 | const oldState = this.state; |
| 206 | this.state = state; |
| 207 | this.emit('change', state); |
| 208 | onServiceChange.fire({ process: this, oldState, newState: state }) |
| 209 | .catch((err) => log.warn('Launcher', `Error during onServiceChange callback/n:ERROR: ${err}`)); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | /** |
| 214 | * Add an entry in the log. |
no test coverage detected