workaround quirks from Node.js (#5631)
This commit is contained in:
@@ -20,9 +20,13 @@ switch (process.argv.length) {
|
||||
var tasks = [ run(), run() ];
|
||||
if (iterations) return;
|
||||
var alive = setInterval(function() {
|
||||
actions.should_stop(stop);
|
||||
actions.should_stop(function() {
|
||||
clearInterval(alive);
|
||||
tasks.forEach(function(kill) {
|
||||
kill();
|
||||
});
|
||||
});
|
||||
}, 8 * 60 * 1000);
|
||||
var deadline = setTimeout(stop, (5 * 60 + 55) * 60 * 1000);
|
||||
|
||||
function run() {
|
||||
var child, stdout, stderr, log;
|
||||
@@ -72,11 +76,3 @@ function run() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function stop() {
|
||||
clearInterval(alive);
|
||||
clearInterval(deadline);
|
||||
tasks.forEach(function(kill) {
|
||||
kill();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user