MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / waitSshUp

Function waitSshUp

e2e/src/vm/ec2.ts:301–307  ·  view source on GitHub ↗
(attempts: number)

Source from the content-addressed store, hash-verified

299 };
300
301 const waitSshUp = async (attempts: number): Promise<boolean> => {
302 for (let i = 0; i < attempts; i++) {
303 if ((await ssh(os === "windows" ? "echo ok" : "true")).code === 0) return true;
304 await sleep(5000);
305 }
306 return false;
307 };
308
309 const waitSshDown = async (attempts = 40): Promise<void> => {
310 for (let i = 0; i < attempts; i++) {

Callers 1

ec2VmFunction · 0.85

Calls 2

sleepFunction · 0.90
sshFunction · 0.70

Tested by

no test coverage detected