本文整理汇总了Python中bitten.model.BuildStep.stopped方法的典型用法代码示例。如果您正苦于以下问题:Python BuildStep.stopped方法的具体用法?Python BuildStep.stopped怎么用?Python BuildStep.stopped使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bitten.model.BuildStep
的用法示例。
在下文中一共展示了BuildStep.stopped方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _start_new_step
# 需要导入模块: from bitten.model import BuildStep [as 别名]
# 或者: from bitten.model.BuildStep import stopped [as 别名]
def _start_new_step(self, build, stepname):
"""Creates the in-memory representation for a newly started
step, ready to be persisted to the database.
"""
step = BuildStep(self.env, build=build.id, name=stepname)
step.status = BuildStep.IN_PROGRESS
step.started = int(time.time())
step.stopped = 0
return step
示例2: HTTPForbidden
# 需要导入模块: from bitten.model import BuildStep [as 别名]
# 或者: from bitten.model.BuildStep import stopped [as 别名]
index = num
current_step = recipe_step
if index is None:
raise HTTPForbidden('No such build step')
last_step = index == num
self.log.debug('Slave %s (build %d) completed step %d (%s) with '
'status %s', build.slave, build.id, index, stepname,
elem.attr['status'])
db = self.env.get_db_cnx()
step = BuildStep(self.env, build=build.id, name=stepname)
try:
step.started = int(_parse_iso_datetime(elem.attr['time']))
step.stopped = step.started + float(elem.attr['duration'])
except ValueError, e:
self.log.error('Error parsing build step timestamp: %s', e,
exc_info=True)
raise HTTPBadRequest(e.args[0])
if elem.attr['status'] == 'failure':
self.log.warning('Build %s step %s failed', build.id, stepname)
step.status = BuildStep.FAILURE
if current_step.onerror == 'fail':
last_step = True
else:
step.status = BuildStep.SUCCESS
step.errors += [error.gettext() for error in elem.children('error')]
step.insert(db=db)
# Collect log messages from the request body