Source cleanup of onJobStart.

This commit is contained in:
John-David Dalton
2014-05-30 14:58:36 -04:00
parent e613198af7
commit fcc357ddd1

View File

@@ -368,14 +368,14 @@ function onJobReset() {
* @param {Object} body The response body JSON object.
*/
function onJobStart(error, res, body) {
var statusCode = _.result(res, 'statusCode'),
taskId = _.first(_.result(body, 'js tests')),
tunnel = this.tunnel;
this.starting = false;
if (this.stopping) {
return;
}
var statusCode = _.result(res, 'statusCode'),
taskId = _.first(_.result(body, 'js tests'));
if (error || !taskId || statusCode != 200) {
if (this.attempts < this.retries) {
this.restart();