Hi Kohsuke, if you could provide me some directions on the following issue I am facing with futures :
- I have a QueueTaskDispatcher with some custom logic in the canRun method, and it works fine - I'm trying to control the Result of the actual Run associated with my Queue.Item that was evaluated in the dispatcher: currently I am using a build step to do it. - Would that be possible to do by grabbing a Future (item.getFuture()) and passing a custom run() function to the Build returned by the Future? I have tried creating a custom class that extends from Build, where I overwrote the run() function (and also a custom BuildExecution) to do what I need. But Eclipse won't let me create a Future with a type of my custom build, instead it only allows Future<Executable> Please let me know if I'm in the right path, or what needs to be done to achieve the desired behavior. Thanks! On Monday, June 9, 2014 at 3:56:14 PM UTC-7, Kohsuke Kawaguchi wrote: > > On 06/04/2014 12:53 PM, Jesse Glick wrote: > > On Wed, Jun 4, 2014 at 1:58 PM, Tom Fennelly <[email protected] > <javascript:>> wrote: > >> I have a test instance running here: http://166.78.9.27:8080/ > > > > The added message > > > >> Build #5 created, you will be redirected when it is ready. > > > > is ironic, seeing as I _just_ merged a PR that specifically removed > > this kind of message from the log of an upstream build: unless and > > until the new build actually starts, you do not know for sure what its > > number will be, you can only guess. (Particularly if the job is marked > > concurrent-capable.) > > Yes, better mention that it's just queued. But Tom, don't worry, leave > those correctness changes to us. Just keep the fresh breeze coming and > deliver what you think the user should see. > > > > BTW, for others, you can now wait for the queued item to get started > with something like this: > > Future<Build> f = > queue.schedule2().getItem().getFuture().getStartCondition(); > > int n = f.get().getNumber(); > > > > -- > Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/ > Try Jenkins Enterprise, our professional version of Jenkins > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" 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-dev/0c0e1967-1189-4a2e-8933-8f13a9216b71%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
