#12 appropriate shutdown when crawling.
This commit is contained in:
parent
c03066cfeb
commit
376b8564e4
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue