> On 19.05.2016, at 15:37, 'Niksan' via Jenkins Users 
> <[email protected]> wrote:
> 
> So, you can fire jobs off in Groovy using ScheduleBuild2 which returns a 
> future.  By its nature, Jenkins will purge any duplicate build requests at 
> some point.

ParameterizedJobMixin#scheduleBuild2(int, List) returns a Queue.Item, or null 
of scheduling failed. If the item was merged, you get a previously existing 
Queue.Item. 

Using its #getId() you can continue to query the Queue#getItem(long) for state 
transitions, e.g. whether it becomes a Queue.LeftItem, and if so, check its 
#isCancelled().

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/491376CF-55DE-49B9-A72A-882EFEFA1C73%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to