Skip to content
Snippets Groups Projects
Commit 70aaeea8 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

test

parent 20686402
No related branches found
No related tags found
1 merge request!806AWS Lambda
...@@ -38,9 +38,6 @@ public class PrimingResource implements OrderedResource { ...@@ -38,9 +38,6 @@ public class PrimingResource implements OrderedResource {
public void afterRestore(Context<? extends Resource> context) throws Exception { public void afterRestore(Context<? extends Resource> context) throws Exception {
ServletUtil.CALC_EXECUTOR.shutdown(); ServletUtil.CALC_EXECUTOR.shutdown();
ServletUtil.TASK_EXECUTOR.shutdown(); ServletUtil.TASK_EXECUTOR.shutdown();
ServletUtil.CALC_EXECUTOR =
MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(ServletUtil.THREAD_COUNT));
ServletUtil.TASK_EXECUTOR = Executors.newSingleThreadExecutor();
} }
private void updateParameter() throws SsmException { private void updateParameter() throws SsmException {
......
...@@ -102,12 +102,14 @@ public class ServletUtil { ...@@ -102,12 +102,14 @@ public class ServletUtil {
@EventListener @EventListener
void shutdown(ShutdownEvent event) { void shutdown(ShutdownEvent event) {
System.out.println("on shutdown");
CALC_EXECUTOR.shutdown(); CALC_EXECUTOR.shutdown();
TASK_EXECUTOR.shutdown(); TASK_EXECUTOR.shutdown();
} }
@EventListener @EventListener
void startup(StartupEvent event) { void startup(StartupEvent event) {
System.out.println("on start up");
if (!awsRuntime.isPresent()) { if (!awsRuntime.isPresent()) {
HAZARD_MODEL = loadModel(modelPath); HAZARD_MODEL = loadModel(modelPath);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment