Also, how is one supposed to getId() from a hudson.model.queue.FutureImpl exactly?
On Thursday, May 19, 2016 at 8:09:22 PM UTC+1, Daniel Beck wrote: > > > > On 19.05.2016, at 15:37, 'Niksan' via Jenkins Users < > [email protected] <javascript:>> 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/827b0904-5f93-4610-87ae-11e7aff71217%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
