Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
8993db2a
Commit
8993db2a
authored
2 months ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
reset executors
parent
7f3ae78f
No related branches found
No related tags found
1 merge request
!806
AWS Lambda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/gov/usgs/earthquake/nshmp/www/PrimingResource.java
+4
-1
4 additions, 1 deletion
...n/java/gov/usgs/earthquake/nshmp/www/PrimingResource.java
src/main/java/gov/usgs/earthquake/nshmp/www/ServletUtil.java
+7
-0
7 additions, 0 deletions
src/main/java/gov/usgs/earthquake/nshmp/www/ServletUtil.java
with
11 additions
and
1 deletion
src/main/java/gov/usgs/earthquake/nshmp/www/PrimingResource.java
+
4
−
1
View file @
8993db2a
...
@@ -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"
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/gov/usgs/earthquake/nshmp/www/ServletUtil.java
+
7
−
0
View file @
8993db2a
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment