Skip to content

Commit

Permalink
Nightly should always classify changes, so it keeps last_processed up…
Browse files Browse the repository at this point in the history
… to date
  • Loading branch information
Dustin J. Mitchell committed May 1, 2010
1 parent dabfc8c commit cb6a453
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions buildbot/schedulers/timed.py
Expand Up @@ -196,8 +196,15 @@ def __init__(self, name, builderNames, minute=0, hour='*',
self.fileIsImportant = fileIsImportant
self._start_time = time.time()

# this scheduler does not support filtering, but ClassifierMixin needs a
# filter anyway
self.make_filter()

def get_initial_state(self, max_changeid):
return {"last_build": None}
return {
"last_build": None,
"last_processed": max_changeid,
}

def getPendingBuildTimes(self):
now = time.time()
Expand All @@ -208,9 +215,9 @@ def getPendingBuildTimes(self):
def run(self):
d = defer.succeed(None)
db = self.parent.db
if self.onlyIfChanged:
# classify_changes comes from base.ClassifierMixin, same as Scheduler.
d.addCallback(lambda ign: db.runInteraction(self.classify_changes))
# always call classify_changes, so that we can keep last_processed
# up to date, in case we are configured with onlyIfChanged.
d.addCallback(lambda ign: db.runInteraction(self.classify_changes))
d.addCallback(lambda ign: db.runInteraction(self._check_timer))
return d

Expand Down

0 comments on commit cb6a453

Please sign in to comment.