當前位置: 首頁>>代碼示例>>Python>>正文


Python build.StatusResourceBuild類代碼示例

本文整理匯總了Python中buildbot.status.web.build.StatusResourceBuild的典型用法代碼示例。如果您正苦於以下問題:Python StatusResourceBuild類的具體用法?Python StatusResourceBuild怎麽用?Python StatusResourceBuild使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了StatusResourceBuild類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: performAction

    def performAction(self, req):
        authz = self.getAuthz(req)
        res = yield authz.actionAllowed('stopAllBuilds', req)
        if not res:
            defer.returnValue(path_to_authzfail(req))
            return

        builders = None
        if self.selectedOrAll == 'all':
            builders = self.status.getBuilderNames()
        elif self.selectedOrAll == 'selected':
            builders = [b for b in req.args.get("selected", []) if b]

        for bname in builders:
            builder_status = self.status.getBuilder(bname)
            (state, current_builds) = builder_status.getState()
            if state != "building":
                continue
            for b in current_builds:
                build_status = builder_status.getBuild(b.number)
                if not build_status:
                    continue
                build = StatusResourceBuild(build_status)
                build.stop(req, auth_ok=True)

        # go back to the welcome page
        defer.returnValue(path_to_root(req))
開發者ID:AbhishekKumarSingh,項目名稱:buildbot,代碼行數:27,代碼來源:builder.py

示例2: stopall

    def stopall(self, req):
        authz = self.getAuthz(req)
        if not authz.actionAllowed("stopAllBuilds", req):
            return Redirect(path_to_authfail(req))

        for bname in self.status.getBuilderNames():
            builder_status = self.status.getBuilder(bname)
            (state, current_builds) = builder_status.getState()
            if state != "building":
                continue
            for b in current_builds:
                build_status = builder_status.getBuild(b.number)
                if not build_status:
                    continue
                build = StatusResourceBuild(build_status)
                build.stop(req, auth_ok=True)
        # go back to the welcome page
        return Redirect(path_to_root(req))
開發者ID:brasse,項目名稱:buildbot,代碼行數:18,代碼來源:builder.py

示例3: stop

 def stop(self, req):
     for bname in self.status.getBuilderNames():
         builder_status = self.status.getBuilder(bname)
         builder_control = None
         c = self.getControl(req)
         if c:
             builder_control = c.getBuilder(bname)
         (state, current_builds) = builder_status.getState()
         if state != "building":
             continue
         for b in current_builds:
             build_status = builder_status.getBuild(b.number)
             if not build_status:
                 continue
             if builder_control:
                 build_control = builder_control.getBuild(b.number)
             else:
                 build_control = None
             build = StatusResourceBuild(build_status, build_control,
                                         builder_control)
             build.stop(req)
     return Redirect("../../waterfall")
開發者ID:binoc-software,項目名稱:mozilla-cvs,代碼行數:22,代碼來源:builder.py

示例4: getChild

 def getChild(self, path, req):
     if path == 'steps':
         return JhStepsResource(self.build_status)
     return StatusResourceBuild.getChild(self, path, req)
開發者ID:rpavlik,項目名稱:jhbuild-vrjuggler,代碼行數:4,代碼來源:build.py


注:本文中的buildbot.status.web.build.StatusResourceBuild類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。