Skip to content

Commit

Permalink
Fixes in bb poller.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami committed Oct 20, 2011
1 parent 7b77ec4 commit a79b4e7
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions lib/pollers.js
Expand Up @@ -50,24 +50,30 @@ Poller.prototype._pollForChanges = function() {
function BuildbotPoller(options, interval) {
Poller.call(this, 'buildbot', options, interval);

this._host = this._options['host'];
this._port = this._options['port'];
this._username = this._options['username'];
this._password = this._options['password'];

this._fetchBuildDataReqObj = null;
}

util.inherits(BuildbotPoller, Poller);

BuildbotPoller.prototype._initialize = function() {
this._fetchBuildDataReqObj = {
'host': this._options['host'],
'port': this._options['port'],
'path': sprintf(BUILDER_STATUS_URL, this._options['builder']),
'method': 'GET'
'host': this._host,
'port': this._port,
'path': sprintf(BUILDER_STATUS_URL, this._options['builder_name']),
'method': 'GET',
'headers': {}
};

this._http = (this._options['secure']) ? https : http;

if (this._username && this._password) {
var headers = utils.getAuthHeaders(this._username, this._password);
this._fetchBuildDataReqObj.headers = headers;
var authHeader = utils.getAuthHeader(this._username, this._password);
this._fetchBuildDataReqObj.headers.Authorization = authHeader;
}

Poller.prototype._initialize.call(this);
Expand Down

0 comments on commit a79b4e7

Please sign in to comment.