コード例 #1
0
ファイル: trigger.py プロジェクト: Ham22/buildbot
 def getSchedulerByName(self, name):
     # we use the fact that scheduler_manager is a multiservice, with schedulers as childs
     # this allow to quickly find schedulers instance by name
     schedulers = self.master.scheduler_manager.namedServices
     if name not in schedulers:
         raise ValueError("unknown triggered scheduler: %r" % (name,))
     sch = schedulers[name]
     if not ITriggerableScheduler.providedBy(sch):
         raise ValueError("triggered scheduler is not ITriggerableScheduler: %r" % (name,))
     return sch
コード例 #2
0
ファイル: trigger.py プロジェクト: pombreda/buildbot-1
 def getSchedulerByName(self, name):
     # we use the fact that scheduler_manager is a multiservice, with schedulers as childs
     # this allow to quickly find schedulers instance by name
     schedulers = self.master.scheduler_manager.namedServices
     if name not in schedulers:
         raise ValueError("unknown triggered scheduler: %r" % (name,))
     sch = schedulers[name]
     if not ITriggerableScheduler.providedBy(sch):
         raise ValueError("triggered scheduler is not ITriggerableScheduler: %r" % (name,))
     return sch
コード例 #3
0
ファイル: trigger.py プロジェクト: Captricity/buildbot
    def getSchedulerByName(self, name):
        # Use a quick cache to avoid generating this dict every time.
        all_schedulers = self._all_schedulers
        if all_schedulers is None:
            all_schedulers = self.build.builder.botmaster.parent.allSchedulers()
            all_schedulers = dict([(sch.name, sch) for sch in all_schedulers])
            self._all_schedulers = all_schedulers

        sch = all_schedulers.get(name)
        if sch is not None:
            if ITriggerableScheduler.providedBy(sch):
                return sch

        return None
コード例 #4
0
ファイル: trigger.py プロジェクト: krebs/buildbot-classic
    def getSchedulerByName(self, name):
        # Use a quick cache to avoid generating this dict every time.
        all_schedulers = self._all_schedulers
        if all_schedulers is None:
            all_schedulers = self.build.builder.botmaster.parent.allSchedulers(
            )
            all_schedulers = dict([(sch.name, sch) for sch in all_schedulers])
            self._all_schedulers = all_schedulers

        sch = all_schedulers.get(name)
        if sch is not None:
            if ITriggerableScheduler.providedBy(sch):
                return sch

        return None
コード例 #5
0
ファイル: trigger.py プロジェクト: denny820909/builder
    def getSchedulers(self):
        all_schedulers = self.build.builder.botmaster.parent.allSchedulers()
        all_schedulers = dict([(sch.name, sch) for sch in all_schedulers])
        invalid_schedulers = []
        triggered_schedulers = []
        # don't fire any schedulers if we discover an unknown one
        for scheduler in self.schedulerNames:
            scheduler = scheduler
            if all_schedulers.has_key(scheduler):
                sch = all_schedulers[scheduler]
                if ITriggerableScheduler.providedBy(sch):
                    triggered_schedulers.append(sch)
                else:
                    invalid_schedulers.append(scheduler)
            else:
                invalid_schedulers.append(scheduler)

        return (triggered_schedulers, invalid_schedulers)
コード例 #6
0
    def getSchedulers(self):
        all_schedulers = self.build.builder.botmaster.parent.allSchedulers()
        all_schedulers = dict([(sch.name, sch) for sch in all_schedulers])
        invalid_schedulers = []
        triggered_schedulers = []
        # don't fire any schedulers if we discover an unknown one
        for scheduler in self.schedulerNames:
            scheduler = scheduler
            if scheduler in all_schedulers:
                sch = all_schedulers[scheduler]
                if ITriggerableScheduler.providedBy(sch):
                    triggered_schedulers.append(sch)
                else:
                    invalid_schedulers.append(scheduler)
            else:
                invalid_schedulers.append(scheduler)

        return (triggered_schedulers, invalid_schedulers)