Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad committed May 15, 2024
1 parent 6626645 commit 9fd94c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ function pollSpotStatus(config, ec2Client, ghClient) {
});
}
function requestAndWaitForSpot(config) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
// subaction is 'start' or 'restart'estart'
const ec2Client = new ec2_1.Ec2Instance(config);
Expand Down Expand Up @@ -747,9 +748,11 @@ function requestAndWaitForSpot(config) {
// wait 10 seconds
yield new Promise((r) => setTimeout(r, 5000 * Math.pow(2, backoff)));
backoff += 1;
core.info("Polling to see if we somehow have an instance up");
instanceId = yield ((_a = ec2Client.getInstancesForTags("running")[0]) === null || _a === void 0 ? void 0 : _a.instanceId);
}
if (instanceId) {
core.info("Successfully requested instance with ID " + instanceId);
core.info("Successfully requested/found instance with ID " + instanceId);
break;
}
}
Expand Down

0 comments on commit 9fd94c0

Please sign in to comment.