#12 appropriate shutdown when crawling.

This commit is contained in:
Shinsuke Sugaya 2013-10-05 22:54:31 +09:00
parent c03066cfeb
commit 376b8564e4

View file

@ -28,6 +28,7 @@ import jp.sf.fess.Constants;
import jp.sf.fess.db.cbean.ScheduledJobCB;
import jp.sf.fess.db.exbhv.ScheduledJobBhv;
import jp.sf.fess.db.exentity.ScheduledJob;
import jp.sf.fess.helper.SystemHelper;
import org.quartz.Job;
import org.quartz.JobDataMap;
@ -83,6 +84,11 @@ public class JobScheduler {
@DestroyMethod
public void destroy() {
final SystemHelper systemHelper = SingletonS2Container
.getComponent(SystemHelper.class);
for (final String sessionId : systemHelper.getRunningSessionIdSet()) {
systemHelper.destroyCrawlerProcess(sessionId);
}
try {
scheduler.shutdown(true);
} catch (final SchedulerException e) {