Use QueueTaskDispatcher canRun() instead of canTake()

This allows to provide more explicit messages when a build is blocked
because it needs already locked resources.

Signed-off-by: Aki Asikainen <aki.asikainen@kone.com>
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
add status of queuing and button for dequeue

Signed-off-by: Aki Asikainen <aki.asikainen@kone.com>
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
add timeout for queued state

It is possible that already queued builds get cancelled by the user. In
order to avoid builds to stay queued and canceled forever, there is a
timeout (hardcoded to 60 seconds).

The hard fixed value should not be a problem. If timeout takes place
(which means there's another blocking issue), the resource(s) will be
freed. But as soon as Jenkins checks the build's queue status next
time, resource(s) will be queued/reserved again.

This timeout does not abort a build, a build in a waiting/queued state
shall continue waiting. This is needed, because if a build is aborted
during another blockage, queued/reserved resources may not be freed.

Signed-off-by: Aki Asikainen <aki.asikainen@kone.com>
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
add .gitignore

Signed-off-by: Robin Jarry <robin.jarry@6wind.com>