Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
Wait a few seconds to ping Jenkins.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Socol committed Jun 7, 2011
1 parent 86a41da commit 3da9ab1
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions jig.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,19 @@ var server = http.createServer(function(req, res) {
if (CONFIG.http.auth) {
headers['Authorization'] = CONFIG.http.auth;
}
web.get({
host: JENKINS,
path: ref.path + '?' + qs.stringify(q),
headers: headers
}, function(res) {
console.log(res.statusCode + ': ' + ref.path + '?' + qs.stringify(q));
}).on('error', function(err) {
console.log(err);
});
// We wrap this in a setTimeout to give downstream repos
// time to sync with github.
setTimeout(function() {
web.get({
host: JENKINS,
path: ref.path + '?' + qs.stringify(q),
headers: headers
}, function(res) {
console.log(res.statusCode + ': ' + ref.path + '?' + qs.stringify(q));
}).on('error', function(err) {
console.log(err);
});
}, 5000);
}
});
});
Expand Down

0 comments on commit 3da9ab1

Please sign in to comment.