Stuart Bourhill
Stuart Bourhill
RRunPod
Created by Stuart Bourhill on 9/2/2024 in #⚡|serverless
Long wait time for Serverless deployments
For clarity, this is a simplified code sample to better illustrate what our "wait-for-runpod" job does. We run this code in a github action for every endpoint right after updating its template.
// wait-for-runpod.mjs
while (true) {
const result = await endpoint.runSync({
input: { describe: true },
});

if (result.output.git_commit_sha === process.env.GIT_COMMIT_SHA) {
break;
}

await wait(10000);
}
// wait-for-runpod.mjs
while (true) {
const result = await endpoint.runSync({
input: { describe: true },
});

if (result.output.git_commit_sha === process.env.GIT_COMMIT_SHA) {
break;
}

await wait(10000);
}
2 replies