workaround quirks from GitHub Actions (#5630)

This commit is contained in:
Alex Lam S.L
2022-08-25 19:35:53 +01:00
committed by GitHub
parent 9cdc1ef6c2
commit 41a7000745
2 changed files with 21 additions and 10 deletions

View File

@@ -20,13 +20,9 @@ switch (process.argv.length) {
var tasks = [ run(), run() ];
if (iterations) return;
var alive = setInterval(function() {
actions.should_stop(function() {
clearInterval(alive);
tasks.forEach(function(kill) {
kill();
});
});
actions.should_stop(stop);
}, 8 * 60 * 1000);
var deadline = setTimeout(stop, (5 * 60 + 55) * 60 * 1000);
function run() {
var child, stdout, stderr, log;
@@ -76,3 +72,11 @@ function run() {
}
}
}
function stop() {
clearInterval(alive);
clearInterval(deadline);
tasks.forEach(function(kill) {
kill();
});
}