Ticket #296: notifySchedulers.diff
| File notifySchedulers.diff, 2.9 kB (added by bhearsum, 6 months ago) |
|---|
-
a/buildbot/buildset.py
old new 31 31 def waitUntilFinished(self): 32 32 return self.status.waitUntilFinished() 33 33 34 def start(self, builders ):34 def start(self, builders, notifyScheduler=None): 35 35 """This is called by the BuildMaster to actually create and submit 36 36 the BuildRequests.""" 37 37 self.requests = [] … … 45 45 self.requests.append(req) 46 46 d = req.waitUntilFinished() 47 47 d.addCallback(self.requestFinished, req) 48 if notifyScheduler: 49 req.subscribe(notifyScheduler.buildStarted) 50 d.addCallback(notifyScheduler.buildFinished, req) 48 51 49 52 # tell our status about them 50 53 req_statuses = [req.status for req in self.requests] -
a/buildbot/interfaces.py
old new 967 967 themselves whether the change is interesting or not, and may initiate 968 968 a build as a result.""" 969 969 970 def submitBuildSet(buildset ):970 def submitBuildSet(buildset, notifyScheduler): 971 971 """Submit a BuildSet object, which will eventually be run on all of 972 972 the builders listed therein.""" 973 973 -
a/buildbot/master.py
old new 870 870 for s in self.allSchedulers(): 871 871 s.addChange(change) 872 872 873 def submitBuildSet(self, bs ):873 def submitBuildSet(self, bs, notifyScheduler=None): 874 874 # determine the set of Builders to use 875 875 builders = [] 876 876 for name in bs.builderNames: … … 884 884 885 885 # now tell the BuildSet to create BuildRequests for all those 886 886 # Builders and submit them 887 bs.start(builders )887 bs.start(builders, notifyScheduler) 888 888 self.status.buildsetSubmitted(bs.status) 889 889 890 890 … … 897 897 def addChange(self, change): 898 898 self.master.change_svc.addChange(change) 899 899 900 def submitBuildSet(self, bs ):901 self.master.submitBuildSet(bs )900 def submitBuildSet(self, bs, notifyScheduler): 901 self.master.submitBuildSet(bs, notifyScheduler) 902 902 903 903 def getBuilder(self, name): 904 904 b = self.master.botmaster.builders[name] -
a/buildbot/test/test_scheduler.py
old new 14 14 15 15 class FakeMaster(service.MultiService): 16 16 d = None 17 def submitBuildSet(self, bs ):17 def submitBuildSet(self, bs, notifyScheduler): 18 18 self.sets.append(bs) 19 19 if self.d: 20 20 reactor.callLater(0, self.d.callback, bs)
![[Buildbot Logo]](/trac/chrome/site/header-text-transparent.png)