本文整理汇总了Python中buildbot.status.slave.SlaveStatus.buildStarted方法的典型用法代码示例。如果您正苦于以下问题:Python SlaveStatus.buildStarted方法的具体用法?Python SlaveStatus.buildStarted怎么用?Python SlaveStatus.buildStarted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类buildbot.status.slave.SlaveStatus
的用法示例。
在下文中一共展示了SlaveStatus.buildStarted方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AbstractBuildSlave
# 需要导入模块: from buildbot.status.slave import SlaveStatus [as 别名]
# 或者: from buildbot.status.slave.SlaveStatus import buildStarted [as 别名]
#.........这里部分代码省略.........
# notify people, but only if we're still in the config
if not self.parent:
return
buildmaster = self.botmaster.master
status = buildmaster.getStatus()
text = "The Buildbot working for '%s'\n" % status.getTitle()
text += ("has noticed that the buildslave named %s went away\n" %
self.slavename)
text += "\n"
text += ("It last disconnected at %s (buildmaster-local time)\n" %
time.ctime(time.time() - self.missing_timeout)) # approx
text += "\n"
text += "The admin on record (as reported by BUILDSLAVE:info/admin)\n"
text += "was '%s'.\n" % self.slave_status.getAdmin()
text += "\n"
text += "Sincerely,\n"
text += " The Buildbot\n"
text += " %s\n" % status.getTitleURL()
subject = "Buildbot: buildslave %s was lost" % self.slavename
return self._mail_missing_message(subject, text)
def updateSlave(self):
"""Called to add or remove builders after the slave has connected.
@return: a Deferred that indicates when an attached slave has
accepted the new builders and/or released the old ones."""
if self.slave:
return self.sendBuilderList()
else:
return defer.succeed(None)
def updateSlaveStatus(self, buildStarted=None, buildFinished=None):
if buildStarted:
self.slave_status.buildStarted(buildStarted)
if buildFinished:
self.slave_status.buildFinished(buildFinished)
@metrics.countMethod('AbstractBuildSlave.attached()')
def attached(self, bot):
"""This is called when the slave connects.
@return: a Deferred that fires when the attachment is complete
"""
# the botmaster should ensure this.
assert not self.isConnected()
metrics.MetricCountEvent.log("AbstractBuildSlave.attached_slaves", 1)
# set up the subscription point for eventual detachment
self.detached_subs = subscription.SubscriptionPoint("detached")
# now we go through a sequence of calls, gathering information, then
# tell the Botmaster that it can finally give this slave to all the
# Builders that care about it.
# we accumulate slave information in this 'state' dictionary, then
# set it atomically if we make it far enough through the process
state = {}
# Reset graceful shutdown status
self.slave_status.setGraceful(False)
# We want to know when the graceful shutdown flag changes
self.slave_status.addGracefulWatcher(self._gracefulChanged)