[Buildbot-commits] buildbot/buildbot interfaces.py,1.34,1.35
Brian Warner
warner at users.sourceforge.net
Thu Oct 20 22:25:31 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9509/buildbot
Modified Files:
interfaces.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-344
Creator: Brian Warner <warner at lothar.com>
clean up use of 'force build' methods
* buildbot/interfaces.py (IBuilderControl.requestBuildSoon): new
method specifically for use by HTML "force build" button and the
IRC "force" command. Raises an immediate error if there are no
slaves available.
(IBuilderControl.requestBuild): make this just submit a build, not
try to check for existing slaves or set up any when-finished
Deferreds or anything.
* buildbot/process/builder.py (BuilderControl): same
* buildbot/status/html.py (StatusResourceBuilder.force): same
* buildbot/status/words.py (IrcStatusBot.command_FORCE): same
* buildbot/test/test_slaves.py: same
* buildbot/test/test_web.py: same
Index: interfaces.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/interfaces.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- interfaces.py 16 Oct 2005 06:25:34 -0000 1.34
+++ interfaces.py 20 Oct 2005 22:25:29 -0000 1.35
@@ -819,9 +819,14 @@
def requestBuild(request):
"""Queue a L{buildbot.process.base.BuildRequest} object for later
- building. This returns a Deferred that fires (with an L{IBuildStatus}
- instance) when the BuildRequest finishes, just as if you did
- req.waitUntilFinished."""
+ building."""
+
+ def requestBuildSoon(request):
+ """Submit a BuildRequest like requestBuild, but raise a
+ L{buildbot.interfaces.NoSlaveError} if no slaves are currently
+ available, so it cannot be used to queue a BuildRequest in the hopes
+ that a slave will eventually connect. This method is appropriate for
+ use by things like the web-page 'Force Build' button."""
def getPendingBuilds():
"""Return a list of L{IBuildRequestControl} objects for this Builder.
More information about the Commits
mailing list