Skip to content

Commit

Permalink
Remove preStartConsumingChanges, startTimedSchedulerService
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 1f73d36 commit aa7a549
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 32 deletions.
5 changes: 0 additions & 5 deletions master/buildbot/schedulers/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,9 @@ def __init__(self, name, shouldntBeSet=NotSet, treeStableTimer=None,
def getChangeFilter(self, branch, branches, change_filter, categories):
raise NotImplementedError

def preStartConsumingChanges(self):
# Hook for subclasses to setup before startConsumingChanges().
return defer.succeed(None)

@defer.inlineCallbacks
def activate(self):
yield base.BaseScheduler.activate(self)
yield self.preStartConsumingChanges()
yield self.startConsumingChanges(fileIsImportant=self.fileIsImportant,
change_filter=self.change_filter,
onlyImportant=self.onlyImportant)
Expand Down
16 changes: 0 additions & 16 deletions master/buildbot/schedulers/timed.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@ def activate(self):
else:
yield self.master.db.schedulers.flushChangeClassifications(self.objectid)

# give subclasses a chance to start up
yield self.startTimedSchedulerService()

def startTimedSchedulerService(self):
"""Hook for subclasses to participate in the L{activate} process;
can return a Deferred"""

@defer.inlineCallbacks
def deactivate(self):
yield base.BaseScheduler.deactivate(self)
Expand Down Expand Up @@ -354,15 +347,6 @@ def __init__(self, name, builderNames, minute=0, hour='*',
self.change_filter = ChangeFilter.fromSchedulerConstructorArgs(
change_filter=change_filter)

def preStartConsumingChanges(self):
return defer.succeed(None)

def startTimedSchedulerService(self):
# Keep this for backwards compatibility, subclasses should
# override startTimedSchedulerService() instead
if self.onlyIfChanged:
return self.preStartConsumingChanges()


class NightlyTriggerable(NightlyBase):
implements(ITriggerableScheduler)
Expand Down
11 changes: 0 additions & 11 deletions master/buildbot/test/unit/test_schedulers_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,6 @@ def check(_):
d.addCallback(lambda _: sched.deactivate())
return d

def test_activate_calls_preStartConsumingChanges(self):
sched = self.makeScheduler(self.Subclass)
sched.preStartConsumingChanges = mock.Mock(
return_value=defer.succeed(None))
d = sched.activate()

@d.addCallback
def check(_):
sched.preStartConsumingChanges.assert_called_with()
return d

def test_gotChange_no_treeStableTimer_unimportant(self):
sched = self.makeScheduler(
self.Subclass, treeStableTimer=None, branch='master')
Expand Down
2 changes: 2 additions & 0 deletions master/docs/relnotes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ Changes for Developers
These methods are not yet documented, and their interface is not stable.
Consult the source code for details on the changes.
* The ``preStartConsumingChanges`` and ``startTimedSchedulerService`` hooks have been removed.
* The triggerable schedulers` ``trigger`` method now requires a list of sourcestamps, rather than a dictionary.
* The :py:class:`~buildbot.sourcestamp.SourceStamp` class is no longer used.
Expand Down

0 comments on commit aa7a549

Please sign in to comment.