I have a colleague who does something like this by editing the configuratio= n of a job, using the REST API. I have seen that when I manually update the= priority of a job in the queue and seen it take effect immediately. Once t= he job starts running you can again edit to set the priority back to its us= ual value. As long as there is only one instance of the job in the queue (t= he one you want to prioritize) it seems like this could work.
A similar idea would be to have a copy of the job with higher priority (cou= ld be created on the fly) which would be triggered after cancelling the reg= ular job.
Of course, if you are comfortable with Groovy, you could implement the "ext= ernal" solution you mention in a job; maybe even as an optional build step = in the job itself. I've done a similar thing to cancel jobs which have been= in the queue more than a specified time limit.
Regards,
Eric
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/535c7b9078e6fcc7dbc9a5838eb83c6a%40indel.ch.