I had server issues and had to restart a bunch of times and now I can't clear the build queue which has 200 items built up.
Doing this in the script console times out Jenkins.instance.queue.clear()
: Cancel queued builds and aborting executing builds using Groovy for Jenkins
The queue, as reported by Jenkins, seems to be totally stale.
Where does Jenkins store this info? On disk?
Is there a script I could run in the console to fix this? Or is there a way to force clear the queue by updating a file on disk?
EDIT
I just tried again and Jenkins.instance.queue.clear()
worked so I don't know what was happening before.
For more info I wasn't suggesting it was timing out because there were too many jobs. Even targeting one queue item like this was timing out:
import hudson.model.*
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.contains('my specific job name') }.each{
q.cancel(it.task)
}
Still curious to know where the queue is held on jenkins to troubleshoot better in the future.