I could query less frequently, but I thought maybe there was a better way to determine whether a process had completed.
On Mon, Jun 22, 2015 at 7:19 PM, Lewis John Mcgibbney < [email protected]> wrote: > Hi Jessica, > > On Fri, Jun 19, 2015 at 10:06 AM, <[email protected]> > wrote: > > > > > I'm writing a Java application that uses the Nutch REST API to execute > the > > crawl cycle. I need to be able to call the next job only when the > previous > > job is finished. > > > > Right now, the only way I know to achieve this is by using GET > /job/{jobId} > > and checking for "state":"FINISHED" within the returned JSON. I do this > > every few seconds or so until the job finishes. > > > > While this method works, I've noticed all the GET requests are slowing > down > > the actual jobs, especially fetch. Is there a more elegant way to listen > > for job completion? > > > > > Is there a reason you need to check very very frequently? Can you not > query every say 10 seconds This is frequent but no sub second and will not > harm the server as much. > Lewis >

