Remove verbose logs for GitHub auth
This commit is contained in:
parent
61fcc6018b
commit
71bb291f40
|
@ -239,14 +239,11 @@ function githubRequest(request, url, query, cb) {
|
|||
request(url, {headers: headers}, function(err, res, buffer) {
|
||||
if (githubToken != null) {
|
||||
if (res.statusCode === 401) { // Unauthorized.
|
||||
console.log('GitHub auth: unauthorized', githubToken);
|
||||
rmGithubToken(githubToken);
|
||||
} else {
|
||||
var remaining = +res.headers['x-ratelimit-remaining'];
|
||||
// reset is in UTC epoch seconds.
|
||||
var reset = +res.headers['x-ratelimit-reset'];
|
||||
console.log('GitHub auth: token', githubToken, 'rate limit', remaining,
|
||||
'reset', reset, 'now', utcEpochSeconds());
|
||||
setReqRemaining(githubToken, remaining, reset);
|
||||
if (remaining === 0) { return; } // Hope for the best in the cache.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user