The stage step has a concurrency attribute (a.k.a. the James Nord Operator) perhaps diving into how that works could give you some insight.
/B On Sun, Dec 13, 2015 at 8:57 PM, Andrew Bayer <[email protected]> wrote: > So, https://issues.jenkins-ci.org/browse/JENKINS-31801 - I'm starting to > dive into the Workflow code to figure out how to actually *do* this. I'm > only really concerned with adding category throttling support for Workflow > node blocks - i.e., wrap your node block with "throttle('some-category') { > ... }" and that will be throttled in the same way as any other job with > that category. It might make sense to add more logic down the road, but > that seems like enough of a challenge to start. =) > > In non-Workflow world, what we do is check for Queue.Tasks that are, in > fact, Jobs, and see if they've got the appropriate ThrottleJobProperty set, > etc to determine whether we've hit the throttle max, using > ThrottleQueueTaskDispatcher, which extends QueueTaskDispatcher, etc... But > in Workflow world, I've got questions that a cursory diving through the > source has not yet been able to answer: > > - Do Workflow steps/nodes/whatever (FlowNode? FlowExecution? Not sure > which class is the equivalent of Job for individual chunks of the DSL?) > implement Queue.Task eventually? Do they end up getting fed through > Queue.JobOffer, which would get them to QueueTaskDispatcher? > - Ok, that ended up being one big question, so I'll leave it at that for > the moment. =) > > A. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CAPbPdObFxBQZVBBUSKojZH9p3VqtPOWQOXSFrCjNc3DEuW7XSA%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-dev/CAPbPdObFxBQZVBBUSKojZH9p3VqtPOWQOXSFrCjNc3DEuW7XSA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Robert Sandell *Software Engineer* *CloudBees Inc.* -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS3Y7W0srUFfPWsJY34tbx2eTxhG_p1_JZ_rU%2BOQiYBCAQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
