当前位置: 首页>>代码示例>>Python>>正文


Python BuildStep.started方法代码示例

本文整理汇总了Python中bitten.model.BuildStep.started方法的典型用法代码示例。如果您正苦于以下问题:Python BuildStep.started方法的具体用法?Python BuildStep.started怎么用?Python BuildStep.started使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bitten.model.BuildStep的用法示例。


在下文中一共展示了BuildStep.started方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _start_new_step

# 需要导入模块: from bitten.model import BuildStep [as 别名]
# 或者: from bitten.model.BuildStep import started [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
开发者ID:kroman0,项目名称:bitten,代码行数:12,代码来源:master.py

示例2: HTTPForbidden

# 需要导入模块: from bitten.model import BuildStep [as 别名]
# 或者: from bitten.model.BuildStep import started [as 别名]
            if recipe_step.id == stepname:
                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)
开发者ID:blaxter,项目名称:Bitten,代码行数:32,代码来源:master.py


注:本文中的bitten.model.BuildStep.started方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。