* Checks if a process is still running. * * @param {string} uuid - The process ID returned by Executor#start. * @returns {Promise } Resolves `true` if the process is running, `false` otherwise. * * @example * const isAlive = await executor.isRunning(uuid);
(uuid)
| 157 | * const isAlive = await executor.isRunning(uuid); |
| 158 | */ |
| 159 | isRunning(uuid) { |
| 160 | return new Promise((resolve, reject) => { |
| 161 | exec( |
| 162 | (result) => { |
| 163 | resolve(result === "running"); |
| 164 | }, |
| 165 | reject, |
| 166 | this.ExecutorType, |
| 167 | "isRunning", |
| 168 | [uuid] |
| 169 | ); |
| 170 | }); |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Lists the processes currently managed by this executor. |
no test coverage detected