mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +00:00
Apply idle-timeout to queued jobs too.
This commit is contained in:
@@ -310,6 +310,7 @@ function check() {
|
|||||||
*/
|
*/
|
||||||
function onCheck(error, response, body) {
|
function onCheck(error, response, body) {
|
||||||
var data = _.result(body, 'js tests', [{}])[0],
|
var data = _.result(body, 'js tests', [{}])[0],
|
||||||
|
elapsed = (_.now() - this.timestamp) / 1000,
|
||||||
options = this.options,
|
options = this.options,
|
||||||
platform = options.platforms[0],
|
platform = options.platforms[0],
|
||||||
result = data.result,
|
result = data.result,
|
||||||
@@ -318,8 +319,7 @@ function onCheck(error, response, body) {
|
|||||||
failures = _.result(result, 'failed'),
|
failures = _.result(result, 'failed'),
|
||||||
label = options.name + ':';
|
label = options.name + ':';
|
||||||
|
|
||||||
if (!completed) {
|
if (!completed && elapsed < idleTimeout) {
|
||||||
console.dir(body);
|
|
||||||
setTimeout(check.bind(this), statusInterval);
|
setTimeout(check.bind(this), statusInterval);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -366,6 +366,7 @@ function onRun(error, response, body) {
|
|||||||
process.exit(3);
|
process.exit(3);
|
||||||
}
|
}
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
this.timestamp = _.now();
|
||||||
check.call(this);
|
check.call(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user