Package buildbot :: Package changes :: Module gerritchangesource :: Class GerritChangeSource
[frames] | no frames]

Class GerritChangeSource

source code

twisted.application.service.Service --+    
                                      |    
               util.ComparableMixin --+    
                                      |    
                      base.ChangeSource --+
                                          |
                                         GerritChangeSource

This source will maintain a connection to gerrit ssh server that will provide us gerrit events in json format.

Nested Classes
  LocalPP
Instance Methods
 
__init__(self, gerritserver, username, gerritport=29418, identity_file=None) source code
 
lineReceived(self, line) source code
 
addChange(self, chdict) source code
 
eventReceived_patchset_created(self, properties, event) source code
 
eventReceived_ref_updated(self, properties, event) source code
 
streamProcessStopped(self) source code
 
startStreamProcess(self) source code
 
startService(self) source code
 
stopService(self) source code
 
describe(self) source code

Inherited from base.ChangeSource: __provides__

Inherited from twisted.application.service.Service: __getstate__, __providedBy__, disownServiceParent, privilegedStartService, setName, setServiceParent

Inherited from util.ComparableMixin: __cmp__, __hash__

Class Variables
  compare_attrs = ['gerritserver', 'gerritport']
  STREAM_GOOD_CONNECTION_TIME = 120
(seconds) connections longer than this are considered good, and reset the backoff timer
  STREAM_BACKOFF_MIN = 0.5
(seconds) minimum, but nonzero, time to wait before retrying a failed connection
  STREAM_BACKOFF_EXPONENT = 1.5
multiplier used to increase the backoff from MIN to MAX on repeated failures
  STREAM_BACKOFF_MAX = 60
(seconds) maximum time to wait before retrying a failed connection

Inherited from base.ChangeSource: __implemented__, master

Inherited from twisted.application.service.Service: name, parent, running

Method Details

__init__(self, gerritserver, username, gerritport=29418, identity_file=None)
(Constructor)

source code 
Parameters:
  • gerritserver (string) - the dns or ip that host the gerrit ssh server,
  • gerritport (int) - the port of the gerrit ssh server,
  • username (string) - the username to use to connect to gerrit,
  • identity_file (string) - identity file to for authentication (optional).

startService(self)

source code 
Overrides: twisted.application.service.Service.startService

stopService(self)

source code 
Overrides: twisted.application.service.Service.stopService

describe(self)

source code 
Overrides: base.ChangeSource.describe