Andrea Baglioni
Andrea Baglioni

Reputation: 303

Programmatically stop an agent

In a web page, i start an FTSearch using an agent called via ajax.

Is there a way to programmatically stop this agent (for example, using a button)?

Upvotes: 0

Views: 60

Answers (2)

D.Bugger
D.Bugger

Reputation: 2359

You could add a check to your code, testing an environment variable for its value... For example, use this (in pseudo-code):

count= count + 1
if count modulo 100 = 0 then // only once per 100 docs
    if getEnvironmentVar("STOP_MY_AGENT")=1 then
        exit
    fi
fi

And then you need some button to set the environment variable. Make sure that in both cases you use the same environment, i.e. the same notes.ini file!

Upvotes: 0

umeli
umeli

Reputation: 1068

Not really. You could programmatically restart the http task... There's a server setting which defines a timeout for webagents, which should be set.

Upvotes: 2

Related Questions