Skip to content

Commit 3ceaa03

Browse files
authored
check if the process is running (#607)
1 parent a122723 commit 3ceaa03

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

javascript/packages/orchestrator/src/providers/native/nativeClient.ts

+10
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,16 @@ export class NativeClient extends Client {
346346
}
347347

348348
async wait_node_ready(nodeName: string, logFile: string): Promise<void> {
349+
// check if the process is alive
350+
const result = await this.runCommand([
351+
"-c",
352+
`ps ${this.processMap[nodeName].pid}`,
353+
]);
354+
if (result.exitCode > 0)
355+
throw new Error(
356+
`Process: ${this.processMap[nodeName].pid}, for node: ${nodeName} dies`,
357+
);
358+
349359
// loop until ready
350360
let t = this.timeout;
351361
const args = [

0 commit comments

Comments
 (0)