If I recall correctly, this is actually a pain - there's no "get all currently running jobs" method. In the throttle concurrent builds plugin, I have to check for running jobs and it's ugly. It looks like you could theoretically get this from OverallLoadStatistics (via computeIdleExecutors and computeTotalExecutors) but while that's exported (<overallLoad> in the top-level /api/xml) there's nothing actually *in* it. Seems like that might make sense to export.
On Wed, Aug 25, 2010 at 12:46 PM, Evgeny Goldin <[hidden email]> wrote:
We need to periodically restart a Hudson server so we have a simple Groovy
script analyzing if Hudson is "busy" before doing so, so that no jobs are
In fact, the script checks Hudson status so that it can restart a Tomcat server. When Tomcat is down we do some house cleaning and bring it up right away. So Hudson CLI can solve our problem but only partially.