Next: , Previous: Change Filters, Up: Schedulers


4.7.3 Scheduler Scheduler

This is the original and still most popular Scheduler class. It follows exactly one branch, and starts a configurable tree-stable-timer after each change on that branch. When the timer expires, it starts a build on some set of Builders. The Scheduler accepts a fileIsImportant function which can be used to ignore some Changes if they do not affect any “important” files.

The arguments to this scheduler are:

name
builderNames
properties
treeStableTimer
The Scheduler will wait for this many seconds before starting the build. If new changes are made during this interval, the timer will be restarted, so really the build will be started after a change and then after this many seconds of inactivity.

If treeStableTimer is None, then a separate build is started immediately for each Change.

fileIsImportant
A callable which takes one argument, a Change instance, and returns True if the change is worth building, and False if it is not. Unimportant Changes are accumulated until the build is triggered by an important change. The default value of None means that all Changes are important.
change_filter
The change filter that will determine whch changes are recognized by this Scheduler; see Change Filters. Note that this is different from fileIsImportant: if the change filter filters out a Change, then it is completely ignored by the scheduler. If a Change is allowed by the change filter, but is deemed unimportant, then it will not cause builds to start, but will be remembered and shown in status displays.
categories (deprecated; use change_filter)
A list of categories of changes that this scheduler will respond to. If this is specified, then any non-matching changes are ignored.
branch (deprecated; use change_filter)
If specified, then this Scheduler will pay attention to a single branch, ignoring Changes that occur on other branches. Setting branch equal to the special value of None means it should only pay attention to the default branch. Note that None is a keyword, not a string, so you want to use None and not "None".

Example:

     from buildbot.schedulers.basic  import Scheduler
     quick = Scheduler(name="quick",
                         branch=None,
                         treeStableTimer=60,
                         builderNames=["quick-linux", "quick-netbsd"])
     full = Scheduler(name="full",
                         branch=None,
                         treeStableTimer=5*60,
                         builderNames=["full-linux", "full-netbsd", "full-OSX"])
     c['schedulers'] = [quick, full]

In this example, the two “quick” builders are triggered 60 seconds after the tree has been changed. The “full” builds do not run quite so quickly (they wait 5 minutes), so hopefully if the quick builds fail due to a missing file or really simple typo, the developer can discover and fix the problem before the full builds are started. Both Schedulers only pay attention to the default branch: any changes on other branches are ignored by these Schedulers. Each Scheduler triggers a different set of Builders, referenced by name.