Пример #1
0
 def setServiceParent(self, parent):
     """
     @type  parent: L{buildbot.master.BuildMaster}
     """
     StatusReceiverMultiService.setServiceParent(self, parent)
     self.master_status = self.parent
     self.master_status.subscribe(self)
Пример #2
0
  def __init__(self, api_token, announce_room_id, room_id, localhost_replace=False, **kwargs):
      StatusReceiverMultiService.__init__(self)

      self.api_token = api_token
      self.announce_room_id = announce_room_id
      self.room_id = room_id
      self.localhost_replace = localhost_replace
Пример #3
0
    def __init__(self, weburl,
                 localhost_replace=False, username=None,
                 icon=None, notify_on_success=True, notify_on_failure=True,
                 **kwargs):
        """
        Creates a SlackStatusPush status service.

        :param weburl: Your Slack weburl
        :param localhost_replace: If your Buildbot web fronted doesn't know
            its public address it will use "localhost" in its links. You can
            change this by setting this variable to true.
        :param username: The user name of the "user" positing the messages on
            Slack.
        :param icon: The icon of the "user" posting the messages on Slack.
        :param notify_on_success: Set this to False if you don't want
            messages when a build was successful.
        :param notify_on_failure: Set this to False if you don't want
            messages when a build failed.
        """

        StatusReceiverMultiService.__init__(self)

        self.weburl = weburl
        self.localhost_replace = localhost_replace
        self.username = username
        self.icon = icon
        self.notify_on_success = notify_on_success
        self.notify_on_failure = notify_on_failure
        self.watched = []
Пример #4
0
    def __init__(self, server, username, reviewCB=DEFAULT_REVIEW,
                 startCB=None, port=29418, reviewArg=None,
                 startArg=None, summaryCB=DEFAULT_SUMMARY, summaryArg=None,
                 identity_file=None, **kwargs):
        StatusReceiverMultiService.__init__(self)

        # If neither reviewCB nor summaryCB were specified, default to sending
        # out "summary" reviews. But if we were given a reviewCB and only a
        # reviewCB, disable the "summary" reviews, so we don't send out both
        # by default.
        if reviewCB is DEFAULT_REVIEW and summaryCB is DEFAULT_SUMMARY:
            reviewCB = None
            summaryCB = defaultSummaryCB
        if reviewCB is DEFAULT_REVIEW:
            reviewCB = None
        if summaryCB is DEFAULT_SUMMARY:
            summaryCB = None

        # Parameters.
        self.gerrit_server = server
        self.gerrit_username = username
        self.gerrit_port = port
        self.gerrit_version = None
        self.gerrit_version_time = 0
        self.gerrit_identity_file = identity_file
        self.reviewCB = reviewCB
        self.reviewArg = reviewArg
        self.startCB = startCB
        self.startArg = startArg
        self.summaryCB = summaryCB
        self.summaryArg = summaryArg
Пример #5
0
    def __init__(self, weburl,
                 localhost_replace=False, username=None, icons=None,
                 builders=None, notify_on_success=True, notify_on_failure=True,
                 **kwargs):
        """
        Creates a SlackStatusPush status service.

        :param weburl: Your Slack weburl
        :param localhost_replace: If your Buildbot web fronted doesn't know
            its public address it will use "localhost" in its links. You can
            change this by setting this variable to true.
        :param username: The user name of the "user" positing the messages on
            Slack.
        :param icons: tuple str (succ, fail) emoji names or icon urls
        :param notify_on_success: Set this to False if you don't want
            messages when a build was successful.
        :param notify_on_failure: Set this to False if you don't want
            messages when a build failed.
        :param builders: List of builder names to filter on. The default value
            of None will result in notifications for every builder.
        """

        StatusReceiverMultiService.__init__(self)

        self.weburl = weburl
        self.localhost_replace = localhost_replace
        self.username = username
        self.icons = icons
        self.builders = builders
        self.notify_on_success = notify_on_success
        self.notify_on_failure = notify_on_failure
        self.watched = []
Пример #6
0
  def __init__(self, api_token, room_id, localhost_replace=False, get_additional_info=None, **kwargs):
      StatusReceiverMultiService.__init__(self)

      self.api_token = api_token
      self.room_id = room_id
      self.localhost_replace = localhost_replace
      self.get_additional_info = get_additional_info
Пример #7
0
    def __init__(self, settings_mod, queue=None, path=None, filter=True,
                 bufferDelay=1, retryDelay=5, blackList=None):
        """
        @filter: when True (default), removes all "", None, False, [] or {}
        entries.
        @bufferDelay: amount of time events are queued before sending, to
        reduce the number of push requests rate. This is the delay between the
        end of a request to initializing a new one.
        @retryDelay: amount of time between retries when no items were pushed on
        last serverPushCb call.
        @blackList: events that shouldn't be sent.
        """
        setup_environ(settings_mod)
        from django.core.cache import cache

        StatusReceiverMultiService.__init__(self)

        # Parameters.
        self.cache = cache
        self.filter = filter
        self.bufferDelay = bufferDelay
        self.retryDelay = retryDelay
        self.blackList = blackList

        # Other defaults.
        # IDelayedCall object that represents the next queued push.
        self.task = None
        self.stopped = False
        self.lastIndex = -1
        self.state = {}
        self.state['started'] = str(datetime.datetime.utcnow())
        self.state['next_id'] = 1
        self.state['last_id_pushed'] = 0
Пример #8
0
 def __init__(self, url, username=None, channel=None, localhost_replace=False, *args, **kwargs):
     self.url = url
     self.username = username
     self.channel = channel
     self.localhost_replace = localhost_replace
     self.master_status = None
     StatusReceiverMultiService.__init__(self, *args, **kwargs)
Пример #9
0
    def __init__(self, serverPushCb, queue=None, path=None, filter=True,
                 bufferDelay=1, retryDelay=5, blackList=None):
        """
        @serverPushCb: callback to be used. It receives 'self' as parameter. It
        should call self.queueNextServerPush() when it's done to queue the next
        push. It is guaranteed that the queue is not empty when this function is
        called.
        @queue: a item queue that implements IQueue.
        @path: path to save config.
        @filter: when True (default), removes all "", None, False, [] or {}
        entries.
        @bufferDelay: amount of time events are queued before sending, to
        reduce the number of push requests rate. This is the delay between the
        end of a request to initializing a new one.
        @retryDelay: amount of time between retries when no items were pushed on
        last serverPushCb call.
        @blackList: events that shouldn't be sent.
        """
        StatusReceiverMultiService.__init__(self)

        # Parameters.
        self.queue = queue
        if self.queue is None:
            self.queue = MemoryQueue()
        self.queue = IndexedQueue(self.queue)
        self.path = path
        self.filter = filter
        self.bufferDelay = bufferDelay
        self.retryDelay = retryDelay
        if not callable(serverPushCb):
            raise NotImplementedError('Please pass serverPushCb parameter.')
        def hookPushCb():
            # Update the index so we know if the next push succeed or not, don't
            # update the value when the queue is empty.
            if not self.queue.nbItems():
                return
            self.lastIndex = self.queue.getIndex()
            return serverPushCb(self)
        self.serverPushCb = hookPushCb
        self.blackList = blackList

        # Other defaults.
        # IDelayedCall object that represents the next queued push.
        self.task = None
        self.stopped = False
        self.lastIndex = -1
        self.state = {}
        self.state['started'] = str(datetime.datetime.utcnow())
        self.state['next_id'] = 1
        self.state['last_id_pushed'] = 0
        # Try to load back the state.
        if self.path and os.path.isdir(self.path):
            state_path = os.path.join(self.path, 'state')
            if os.path.isfile(state_path):
                with open(state_path, 'r') as f:
                    self.state.update(json.load(f))

        if self.queue.nbItems():
            # Last shutdown was not clean, don't wait to send events.
            self.queueNextServerPush()
    def __init__(self):
        StatusReceiverMultiService.__init__(self)
        timer = TimerService(60*60, self.report_pending_builds)
        timer.setServiceParent(self)

        timer = TimerService(30, self.metrics)
        timer.setServiceParent(self)
Пример #11
0
	def startService(self):
		StatusReceiverMultiService.startService(self)

		self.agent = twisted.web.client.Agent(reactor, WebClientContextFactory())

		self.status = self.parent.getStatus()
		self.status.subscribe(self)
Пример #12
0
    def startService(self):
        print """Starting up."""
        if self.summaryCB:
            # TODO: handle deferred
            self.summarySubscribe().addErrback(log.err, 'while subscribing')

        StatusReceiverMultiService.startService(self)
  def __init__(self, subdomain, api_token, channel_name, localhost_replace=False, builder_name=False, **kwargs):
      StatusReceiverMultiService.__init__(self)

      self.subdomain = subdomain
      self.api_token = api_token
      self.channel_name = channel_name
      self.localhost_replace = localhost_replace
      self.builder_name = builder_name
Пример #14
0
	def __init__(self, slaves):
		StatusReceiverMultiService.__init__(self)
		
		assert isinstance(slaves,list)
		for name in slaves:
			assert isinstance(name,str)
		
		self.slaves = slaves
Пример #15
0
 def startService(self):
   StatusReceiverMultiService.startService(self)
   if self.dry_run:
     return
   self.integrator_starting = self._start_integrator()
   common.log_on_error(self.integrator_starting, 'Could not start integrator')
   self._run_when_started(self.integrator.poll_builds)
   self.parent.getStatus().subscribe(self)
Пример #16
0
  def startService(self):
    """Start the service and subscribe for updates."""
    self._create_logger()
    self._create_event_logger()
    self._create_ts_mon_logger()

    StatusReceiverMultiService.startService(self)
    self.status = self.parent.getStatus()
    self.status.subscribe(self)
Пример #17
0
  def startService(self):
    """Twisted service is starting up."""
    StatusReceiverMultiService.startService(self)

    # Subscribe to get status updates.
    self._status = self.parent.getStatus()
    self._status.subscribe(self)

    # Schedule our first push.
    self._schedulePush()
Пример #18
0
  def __init__(self, gerrit_host, review_factory=None):
    """Creates a TryJobGerritStatus.

    Args:
      gerrit_host: a URL of the Gerrit instance.
      review_factory: a function (self, builder_name, build, result) => review,
        where review is a dict described in Gerrit docs:
        https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#review-input
    """
    StatusReceiverMultiService.__init__(self)
    self.review_factory = review_factory or TryJobGerritStatus.createReview
    self.agent = GerritAgent(gerrit_host)
    self.status = None
Пример #19
0
  def __init__(self, logfile='status.log'):
    """Create a StatusEventLogger.

    Args:
      logfile: base filename for events to be written to.
    """
    self.logfile = logfile
    # Will be initialized in startService
    self.logger = None
    self.status = None
    self._active = False
    self._last_checked_active = 0
    # Can't use super because StatusReceiverMultiService is an old-style class.
    StatusReceiverMultiService.__init__(self)
Пример #20
0
  def __init__(self, integrator, buildbucket_service_factory, dry_run):
    """Creates a new BuildBucketStatus.

    Args:
      integrator (BuildBucketIntegrator): integrator to notify about status
        changes.
      buildbucket_service_factory (function): returns a DeferredResource as
        Deferred that will be used to access buildbucket service API.
      dry_run (bool): if True, do not start integrator.
    """
    StatusReceiverMultiService.__init__(self)
    self.integrator = integrator
    self.buildbucket_service_factory = buildbucket_service_factory
    self.dry_run = dry_run
    self.integrator_starting = None
Пример #21
0
 def __init__(self, base_url, user, password):
     """
     :param base_url: The base url of the stash host, up to the path.
     For example, https://stash.example.com/
     :param user: The stash user to log in as using http basic auth.
     :param password: The password to use with the stash user.
     :return:
     """
     StatusReceiverMultiService.__init__(self)
     if not base_url.endswith('/'):
         base_url += '/'
     self.base_url = '%srest/build-status/1.0/commits/' % (base_url, )
     self.auth = b64encode('%s:%s' % (user, password))
     self._sha = Interpolate('%(src::revision)s')
     self.master_status = None
Пример #22
0
    def __init__(
        self, api_token, localhost_replace=False, endpoint="data.logentries.com", port=10000, tls=False, **kwargs
    ):
        StatusReceiverMultiService.__init__(self)

        self.api_token = api_token
        self.localhost_replace = localhost_replace
        self.endpoint = endpoint
        self.port = port
        self.tls = tls

        self.f = PlainTextAppenderFactory(token=api_token)
        if tls:
            self.r = reactor.connectSSL(endpoint, port, self.f, ssl.ClientContextFactory())
        else:
            self.r = reactor.connectTCP(endpoint, port, self.f)
Пример #23
0
  def startService(self):
    """Twisted service is starting up."""
    StatusReceiverMultiService.startService(self)

    # Subscribe to get status updates.
    self._status = self.parent.getStatus()
    self._status.subscribe(self)

    @defer.inlineCallbacks
    def start_loop():
      # Load and start our master push resource.
      self._res = yield self._loadResource()
      self._res.start()

      # Schedule our first push.
      self._schedulePush()
    reactor.callWhenRunning(start_loop)
Пример #24
0
 def __init__(self, server, username, reviewCB=defaultReviewCB, port=29418, reviewArg=None,
              **kwargs):
     """
     @param server:    Gerrit SSH server's address to use for push event notifications.
     @param username:  Gerrit SSH server's username.
     @param reviewCB:  Callback that is called each time a build is finished, and that is used
                       to define the message and review approvals depending on the build result.
     @param port:      Gerrit SSH server's port.
     @param reviewArg: Optional argument that is passed to the callback.
     """
     StatusReceiverMultiService.__init__(self)
     # Parameters.
     self.gerrit_server = server
     self.gerrit_username = username
     self.gerrit_port = port
     self.reviewCB = reviewCB
     self.reviewArg = reviewArg
Пример #25
0
    def stopService(self):
        """Shutting down."""
        self.finalPush()
        self.stopped = True

        # Make sure all Deferreds are called on time and in a sane order.
        defers = filter(None, [d, StatusReceiverMultiService.stopService(self)])
        return defer.DeferredList(defers)
Пример #26
0
  def __init__(self, activeMaster, server=None, master=None,
               discoveryUrlTemplate=None,
               pushInterval=None):
    """
    Instantiates a new StatusPush service.

    The server and master values are used to form the BuildBot URL that a given
    build references. For example:
      - server: http://build.chromium.org/p
      - master: chromium

    Args:
      activeMaster: The current Master instance.
      server: (str) The server URL value for the status pushes.
      master: (str) The master name.
      discoveryUrlTemplate: (str) If not None, the discovery URL template to use
          for 'chrome-build-extract' cloud endpoint API service discovery.
      pushInterval: (number/timedelta) The data push interval. If a number is
          supplied, it is the number of seconds.
    """
    assert activeMaster, 'An active master must be supplied.'
    StatusReceiverMultiService.__init__(self)

    # Infer server/master from 'buildbot_url' master configuration property,
    # if possible.
    if hasattr(activeMaster, 'buildbot_url') and not (server and master):
      inf_server, inf_master = self.inferServerMaster(activeMaster.buildbot_url)
      server = server or inf_server
      master = master or inf_master
    assert server and master, 'A server and master value must be supplied.'

    # Parameters.
    self.activeMaster = activeMaster
    self.server = server
    self.master = master
    self.discoveryUrlTemplate = (discoveryUrlTemplate or
                                 CBE_DISCOVERY_SERVICE_URL)
    self.pushInterval = self._getTimeDelta(pushInterval or
                                           self.DEFAULT_PUSH_INTERVAL_SEC)

    self._status = None
    self._res = None
    self._updated_builds = set()
    self._pushTimer = None
    self._sequence = 0
Пример #27
0
    def __init__(self, server, username, reviewCB=DEFAULT_REVIEW,
                 startCB=None, port=29418, reviewArg=None,
                 startArg=None, summaryCB=DEFAULT_SUMMARY, summaryArg=None,
                 identity_file=None, **kwargs):
        """
        @param server:    Gerrit SSH server's address to use for push event notifications.
        @param username:  Gerrit SSH server's username.
        @param reviewCB:  Callback that is called each time a build is finished, and that is used
                          to define the message and review approvals depending on the build result.
        @param startCB:   Callback that is called each time a build is started.
                          Used to define the message sent to Gerrit.
        @param port:      Gerrit SSH server's port.
        @param reviewArg: Optional argument passed to the review callback.
        @param startArg:  Optional argument passed to the start callback.
        @param summaryCB:  Callback that is called each time a buildset finishes, and that is used
                           to define a message and review approvals depending on the build result.
        @param summaryArg: Optional argument passed to the summary callback.
        """
        StatusReceiverMultiService.__init__(self)

        # If neither reviewCB nor summaryCB were specified, default to sending
        # out "summary" reviews. But if we were given a reviewCB and only a
        # reviewCB, disable the "summary" reviews, so we don't send out both
        # by default.
        if reviewCB is DEFAULT_REVIEW and summaryCB is DEFAULT_SUMMARY:
            reviewCB = None
            summaryCB = defaultSummaryCB
        if reviewCB is DEFAULT_REVIEW:
            reviewCB = None
        if summaryCB is DEFAULT_SUMMARY:
            summaryCB = None

        # Parameters.
        self.gerrit_server = server
        self.gerrit_username = username
        self.gerrit_port = port
        self.gerrit_version = None
        self.gerrit_version_time = 0
        self.gerrit_identity_file = identity_file
        self.reviewCB = reviewCB
        self.reviewArg = reviewArg
        self.startCB = startCB
        self.startArg = startArg
        self.summaryCB = summaryCB
        self.summaryArg = summaryArg
Пример #28
0
  def startService(self):
    """Start the service and subscribe for updates."""
    logger = logging.getLogger(__name__)
    logger.propagate = False
    logger.setLevel(logging.INFO)
    # %(bbEvent)19s because builderChangedState is 19 characters long
    formatter = logging.Formatter('%(asctime)s - %(bbEvent)19s - %(message)s')
    # Use delay=True so we don't open an empty file while self.active=False.
    handler = TimedRotatingFileHandler(
        os.path.join(self.parent.basedir, self.logfile),
        when='H', interval=1, delay=True)
    handler.setFormatter(formatter)
    logger.addHandler(handler)
    self.logger = logger

    StatusReceiverMultiService.startService(self)
    self.status = self.parent.getStatus()
    self.status.subscribe(self)
Пример #29
0
    def __init__(self, token, repoOwner, repoName, sha=None, startDescription=None, endDescription=None, baseURL=None):
        """
        Token for GitHub API.
        """
        if not GitHubAPI:
            config.error("GitHubStatus requires txgithub package installed")

        StatusReceiverMultiService.__init__(self)

        self._sha = sha or Interpolate("%(src::revision)s")
        self._repoOwner = repoOwner
        self._repoName = repoName
        self._startDescription = startDescription or "Build started."
        self._endDescription = endDescription or "Build done."

        self._github = GitHubAPI(oauth2_token=token, baseURL=baseURL)

        self._status = None
Пример #30
0
  def __init__(self, gerrit_host, review_factory=None, cq_builders=None,
               **kwargs):
    """Creates a TryJobGerritStatus.

    Args:
      gerrit_host: a URL of the Gerrit instance.
      review_factory: a function (self, builder_name, build, result) => review,
        where review is a dict described in Gerrit docs:
        https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#review-input
      cq_builders: a list of buildernames, if specified, patchset will be
          submitted if all builders have completed successfully.
      kwargs: keyword arguments passed to GerritAgent.
    """
    StatusReceiverMultiService.__init__(self)
    self.review_factory = review_factory or TryJobGerritStatus.createReview
    self.agent = GerritAgent(gerrit_host, **kwargs)
    self.status = None
    self.cq_builders = cq_builders
Пример #31
0
 def setServiceParent(self, parent):
   StatusReceiverMultiService.setServiceParent(self, parent)
   self.master_status = self.parent
   self.master_status.subscribe(self)
   self.master = self.master_status.master
Пример #32
0
 def startService(self):
     self.status = self.parent
     self.master = self.status.master
     StatusReceiverMultiService.startService(self)
     self.status.subscribe(self)
Пример #33
0
 def startService(self):
     StatusReceiverMultiService.startService(self)
     self._status = self.parent.getStatus()
     self._status.subscribe(self)
     log.msg("GitHubStatus: Service started.")
Пример #34
0
 def stopService(self):
     StatusReceiverMultiService.stopService(self)
     self._status.unsubscribe(self)
     log.msg("GitHubStatus: Service stopped.")
Пример #35
0
 def setServiceParent(self, parent):
     StatusReceiverMultiService.setServiceParent(self, parent)
     self.setup()
Пример #36
0
    def disownServiceParent(self):
        self.master_status.unsubscribe(self)
        self.master_status = None

        return StatusReceiverMultiService.disownServiceParent(self)
Пример #37
0
 def disownServiceParent(self):
     """Unsubscribe from watched builders"""
     for w in self.watched:
         w.unsubscribe(self)
     return StatusReceiverMultiService.disownServiceParent(self)
Пример #38
0
 def __init__(self):
     StatusReceiverMultiService.__init__(self)
     timer = TimerService(30, self.metrics)
     timer.setServiceParent(self)
Пример #39
0
    def startService(self):
        print """Starting up."""
        if self.summaryCB:
            self.summarySubscribe()

        StatusReceiverMultiService.startService(self)
Пример #40
0
 def startService(self):
     print """Starting up StashStatusPush"""
     self.summarySubscribe()
     StatusReceiverMultiService.startService(self)
 def startService(self):
     StatusReceiverMultiService.startService(self)
     self.status = self.parent.getStatus()  # pylint: disable=W0201
     self.status.subscribe(self)
Пример #42
0
 def startService(self):
     StatusReceiverMultiService.startService(self)
     self._status = self.parent.getStatus()
     self._status.subscribe(self)
Пример #43
0
 def startService(self):
     log.msg("""Starting up StashStatusPush""")
     self.summarySubscribe()
     StatusReceiverMultiService.startService(self)
Пример #44
0
    def __init__(self,
                 serverPushCb,
                 queue=None,
                 path=None,
                 filter=True,
                 bufferDelay=1,
                 retryDelay=5,
                 blackList=None):
        """
        @serverPushCb: callback to be used. It receives 'self' as parameter. It
        should call self.queueNextServerPush() when it's done to queue the next
        push. It is guaranteed that the queue is not empty when this function is
        called.
        @queue: a item queue that implements IQueue.
        @path: path to save config.
        @filter: when True (default), removes all "", None, False, [] or {}
        entries.
        @bufferDelay: amount of time events are queued before sending, to
        reduce the number of push requests rate. This is the delay between the
        end of a request to initializing a new one.
        @retryDelay: amount of time between retries when no items were pushed on
        last serverPushCb call.
        @blackList: events that shouldn't be sent.
        """
        StatusReceiverMultiService.__init__(self)

        # Parameters.
        self.watched = []
        self.queue = queue
        if self.queue is None:
            self.queue = MemoryQueue()
        self.queue = IndexedQueue(self.queue)
        self.path = path
        self.filter = filter
        self.bufferDelay = bufferDelay
        self.retryDelay = retryDelay
        if not callable(serverPushCb):
            raise NotImplementedError('Please pass serverPushCb parameter.')

        def hookPushCb():
            # Update the index so we know if the next push succeed or not, don't
            # update the value when the queue is empty.
            if not self.queue.nbItems():
                return defer.succeed(None)
            self.lastIndex = self.queue.getIndex()
            return defer.maybeDeferred(serverPushCb, self)

        self.serverPushCb = hookPushCb
        self.blackList = blackList

        # Other defaults.
        # IDelayedCall object that represents the next queued push.
        self.task = None
        self.stopped = False
        self.lastIndex = -1
        self.state = {}
        self.state['started'] = str(datetime.datetime.utcnow())
        self.state['next_id'] = 1
        self.state['last_id_pushed'] = 0
        # Try to load back the state.
        if self.path and os.path.isdir(self.path):
            state_path = os.path.join(self.path, 'state')
            if os.path.isfile(state_path):
                with open(state_path, 'r') as f:
                    self.state.update(json.load(f))

        if self.queue.nbItems():
            # Last shutdown was not clean, don't wait to send events.
            self.queueNextServerPush()
Пример #45
0
 def disownServiceParent(self):
   self.master_status.unsubscribe(self)
   self.master_status = None
   for w in self.watched:
     w.unsubscribe(self)
   return StatusReceiverMultiService.disownServiceParent(self)
Пример #46
0
  def __init__(self, api_token, room_id, localhost_replace=False, **kwargs):
      StatusReceiverMultiService.__init__(self)

      self.api_token = api_token
      self.room_id = room_id
      self.localhost_replace = localhost_replace
 def __init__(self, gerrit_url, buildbot_url):
     StatusReceiverMultiService.__init__(self)
     self.agent = GerritAgent(gerrit_url)
     self.buildbot_url = buildbot_url
Пример #48
0
 def stopService(self):
   self.integrator.stop()
   StatusReceiverMultiService.stopService(self)
 def startService(self):
     print """Starting up."""
     StatusReceiverMultiService.startService(self)
     self.status = self.parent.getStatus()
     self.status.subscribe(self)
Пример #50
0
 def stopService(self):
     StatusReceiverMultiService.stopService(self)
     self._status.unsubscribe(self)
Пример #51
0
 def __init__(self, url, username=None, channel=None, *args, **kwargs):
     self.url = url
     self.username = username
     self.channel = channel
     self.master_status = None
     StatusReceiverMultiService.__init__(self, *args, **kwargs)
Пример #52
0
	def setServiceParent(self, parent):
		StatusReceiverMultiService.setServiceParent(self, parent)
		
		self.master = parent.master
		s = self.master.getStatus()
		s.subscribe(self)
Пример #53
0
 def startService(self):
     """Starting up."""
     StatusReceiverMultiService.startService(self)
     self.status = self.parent.getStatus()
     self.status.subscribe(self)
     self.initialPush()
Пример #54
0
 def __init__(self):
     StatusReceiverMultiService.__init__(self)
     self.status = None
     self.thread_pool = threadpool.ThreadPool(1, 1,
                                              'MonitoringStatusReceiver')
     self.loop = task.LoopingCall(self.updateMetricsAndFlush)