[Fix] Fixed StrolchJobsHandler stop() and destroy()
This commit is contained in:
parent
2bec7d89cf
commit
ef230cf040
|
@ -1,7 +1,7 @@
|
|||
package li.strolch.job;
|
||||
|
||||
import static java.lang.String.join;
|
||||
import static li.strolch.runtime.StrolchConstants.*;
|
||||
import static li.strolch.runtime.StrolchConstants.TYPE_STROLCH_JOB;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
|
@ -195,15 +195,18 @@ public class StrolchJobsHandler extends StrolchComponent {
|
|||
@Override
|
||||
public void stop() throws Exception {
|
||||
|
||||
if (this.jobs != null) {
|
||||
for (StrolchJob job : this.jobs.values()) {
|
||||
job.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
super.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
if (this.jobs != null)
|
||||
this.jobs.clear();
|
||||
super.destroy();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue