Skip to content

Commit

Permalink
Fixed some minor screwups
Browse files Browse the repository at this point in the history
  • Loading branch information
jpommerening authored and Xavier Delannoy committed Nov 5, 2014
1 parent 11b9d6a commit 1f73d36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 2 additions & 4 deletions master/buildbot/schedulers/basic.py
Expand Up @@ -97,17 +97,15 @@ def activate(self):
# if we have a treeStableTimer, if there are classified changes
# out there, start their timers again
if self.treeStableTimer:
d = self.scanExistingClassifiedChanges()
yield self.scanExistingClassifiedChanges()

# otherwise, we don't care about classified
# changes, so get rid of any hanging around from previous
# configurations
else:
d = self.master.db.schedulers.flushChangeClassifications(
yield self.master.db.schedulers.flushChangeClassifications(
self.objectid)

yield d

@defer.inlineCallbacks
def deactivate(self):
# the base deactivate will unsubscribe from new changes
Expand Down
12 changes: 5 additions & 7 deletions master/buildbot/schedulers/timed.py
Expand Up @@ -44,7 +44,7 @@ def convertBranchParameter(kwargs):
}}


class Timed(base.BaseScheduler):
class Timed(base.BaseScheduler, AbsoluteSourceStampsMixin):

"""
Parent class for timed schedulers. This takes care of the (surprisingly
Expand Down Expand Up @@ -149,7 +149,7 @@ def gotChange(self, change, important):
return d

@defer.inlineCallbacks
def startBuild(self, **kwargs):
def startBuild(self):
# use the collected changes to start a build
scheds = self.master.db.schedulers
classifications = yield scheds.getChangeClassifications(self.objectid)
Expand All @@ -167,8 +167,7 @@ def startBuild(self, **kwargs):
if changeids:
max_changeid = changeids[-1] # (changeids are sorted)
yield self.addBuildsetForChanges(reason=self.reason,
changeids=changeids,
**kwargs)
changeids=changeids)
yield scheds.flushChangeClassifications(self.objectid,
less_than=max_changeid + 1)
else:
Expand All @@ -177,8 +176,7 @@ def startBuild(self, **kwargs):
sourcestamps = [dict(codebase=cb) for cb in self.codebases.keys()]
yield self.addBuildsetForSourceStampsWithDefaults(
reason=self.reason,
sourcestamps=sourcestamps,
**kwargs)
sourcestamps=sourcestamps)

def getCodebaseDict(self, codebase):
if self.createAbsoluteSourceStamps:
Expand Down Expand Up @@ -331,7 +329,7 @@ def getNextBuildTime(self, lastActuated):
return defer.succeed(nextdate)


class Nightly(NightlyBase, AbsoluteSourceStampsMixin):
class Nightly(NightlyBase):
compare_attrs = ('fileIsImportant', 'change_filter', 'onlyImportant',)

def __init__(self, name, builderNames, minute=0, hour='*',
Expand Down

0 comments on commit 1f73d36

Please sign in to comment.