[Buildbot-devel] Lock check question
kay.hayen at gmail.com
Sat Jun 21 09:32:24 UTC 2014
I am having the issue that my "heavy" slave lock in exlusive mode correctly
prevents more than one build from executing, however, more than one is
started, in fact up to the limit that I allow for the slave. The idea of
"heavy" jobs, was to make that limit tiered, that means only one heavy job,
and "n" total should run.
In order to achieve that, I came up with this code:
from buildbot.locks import SlaveLock
heavy_lock = SlaveLock("heavy")
def checkLock(builder, slave, request):
return heavy_lock.isAvailable(slave, "exclusive")
and for builds then e.g. :
"/usr/bin/" + python,
[ "tests/" + test_case + "/" + getRunner(test_case),
locks = ( if not is_heavy else [
canStartBuild = None if not is_heavy else checkLock
But that kind of API that mean to use in "checkLock" doesn't seem to exist.
I checked the "slave" object and found locks in there, which was "None", so
maybe it's wrong.
And is using canStartBuild even correct usage. It doesn't seem to get a
second chance to change its mind, does it.
PS: Updated to 0.8.9, so far smooth sailing.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel