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

reset executors

parent 7f3ae78f
No related branches found
No related tags found
1 merge request!806AWS Lambda
...@@ -32,7 +32,10 @@ public class PrimingResource implements OrderedResource { ...@@ -32,7 +32,10 @@ public class PrimingResource implements OrderedResource {
} }
@Override @Override
public void afterRestore(Context<? extends Resource> context) throws Exception {} public void afterRestore(Context<? extends Resource> context) throws Exception {
System.out.println("Reset exexutors");
ServletUtil.resetExecutors();
}
private void updateParameter() throws SsmException { private void updateParameter() throws SsmException {
var parameterName = System.getenv("IMT_PARAMETER_NAME"); var parameterName = System.getenv("IMT_PARAMETER_NAME");
......
...@@ -89,7 +89,14 @@ public class ServletUtil { ...@@ -89,7 +89,14 @@ public class ServletUtil {
.serializeNulls() .serializeNulls()
.setPrettyPrinting() .setPrettyPrinting()
.create(); .create();
}
static void resetExecutors() {
CALC_EXECUTOR.shutdown();
TASK_EXECUTOR.shutdown();
CALC_EXECUTOR = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(THREAD_COUNT));
TASK_EXECUTOR = Executors.newSingleThreadExecutor();
} }
static void model(HazardModel model) { static void model(HazardModel model) {
......
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