Determining a plugin's config within QueueTaskDispatcher

3 views
Skip to first unread message

Christopher Orr

unread,
Jan 25, 2011, 4:49:47 PM1/25/11
to hudso...@googlegroups.com
Hi all,

I have a BuildWrapper plugin which implements ResourceActivity.

The plugin returns a hash of its own config as a writable Resource in
getResourceList(). This works perfectly at preventing multiple jobs
with the same plugin config from running concurrently across a Hudson
cluster.

However, multiple jobs with the same plugin config *should* be allowed
to run concurrently, so long as they are all on separate servers, i.e.
never more than one job with config XYZ running on each server at a time.

Ideally, I would use a QueueTaskDispatcher to examine a Node to see
whether a Task with the given plugin config is already running, then
veto that Task.

But I can't find a way that I can query a Task to retrieve my plugin's
specific config info during QueueTaskDispatcher.canTake(Node, Task).

In general the throttle-concurrents plugin is similar; it can throttle
concurrent instances per-node for a given Job, whereas I need to do this
per-node for a given BuildWrapper config, regardless of the Job.

Any advice as to whether this could be achieved?

Thanks,
Chris

Reply all
Reply to author
Forward
0 new messages