Hi,

I would like to ask for some help with nextBuild.

Let's assume that I set some property to the scheduled build. I would
like to implement the nextBuild function in approximately this way:

def pickNextBuild(builder, requests):
    d = requests[0]
    for request in requests:
        if request.properties.getProperty('priority') <
d.roperties.getProperty('priority'):
            d = request
    return d

but I cannot figure out how to actually read any property. The "if
part" throws a syntax error, but I tried multiple variants without any
success.

buildrequest.py mentions

    @type properties: L{properties.Properties}
    @ivar properties: properties that should be applied to this build, taken
    from the buildset containing this build request

    @ivar priority: request priority

but I fail to see how to use any of these.

Documentation provides two examples, but I'm unable to understand how
to apply those to our case.

Thank you very much,
    Mojca
_______________________________________________
users mailing list
users@buildbot.net
https://lists.buildbot.net/mailman/listinfo/users

Reply via email to