Hi all,

I wonder how is the best way to stop a running droid?

Imaging you have a process like a web form that invokes the crawling via
an ajax call. Now you may know the jenkins feature to see the build logs
in real time. Imagine you see the droids logs that way and you spot a
bug/problem which you need to fix before the droid can proceed.
Sometimes you may be interested to simply pause the crawling since you
can do a hotfix or sometimes you just need to finish that crawl.

Now in the taskMaster we control whether a droid has finished in public
synchronized void start(final Queue<T> queue, final Droid<T> droid) with:

        boolean terminated = false;
        while (!terminated) {
...
        }
...
        droid.finished();

Meaning there is no way to stop the crawling from the outside. However
we could extract terminated as constant and change the interface to have
a stop in the taskMaster. Or do you see better places like  maybe
Droid.stop?

salu2

-- 
Thorsten Scherler <scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/

Reply via email to