Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
portal-backend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HBP Medical Informatics Platform
portal-backend
Commits
ce192eb3
Commit
ce192eb3
authored
6 years ago
by
Ludovic Claude
Browse files
Options
Downloads
Patches
Plain Diff
Fix startup
parent
26b0f3b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
[pull] master from LREN-CHUV:master
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pom.xml
+13
-3
13 additions, 3 deletions
pom.xml
src/main/java/eu/hbp/mip/MIPApplication.java
+2
-0
2 additions, 0 deletions
src/main/java/eu/hbp/mip/MIPApplication.java
src/main/java/eu/hbp/mip/StartupTasks.java
+2
-1
2 additions, 1 deletion
src/main/java/eu/hbp/mip/StartupTasks.java
with
17 additions
and
4 deletions
pom.xml
+
13
−
3
View file @
ce192eb3
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
eu.hbp.mip
</groupId>
...
...
@@ -15,7 +15,7 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
1.3.7.RELEASE
</version>
<relativePath
/>
<relativePath/>
</parent>
<properties>
...
...
@@ -75,7 +75,17 @@
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
<artifactId>
spring-boot-starter-log4j2
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/eu/hbp/mip/MIPApplication.java
+
2
−
0
View file @
ce192eb3
...
...
@@ -4,6 +4,7 @@
package
eu.hbp.mip
;
import
ch.chuv.lren.mip.portal.Reporting
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
...
@@ -11,6 +12,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
public
class
MIPApplication
{
public
static
void
main
(
String
[]
args
)
{
new
Reporting
().
init
();
SpringApplication
.
run
(
MIPApplication
.
class
,
args
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/eu/hbp/mip/StartupTasks.java
+
2
−
1
View file @
ce192eb3
...
...
@@ -43,13 +43,14 @@ public class StartupTasks implements ApplicationListener<ApplicationReadyEvent>
// Pre-fill the local variable repository with the list of datasets, interpreted here as variables
// (a bit like a categorical variable can be split into a set of variables (a.k.a one hot encoding in Data science) )
// Try 5 times, to be more robust in the face of cluster failures / slow startup
LOGGER
.
info
(
"Prefill variable repository with datasets..."
);
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
try
{
for
(
Dataset
dataset
:
datasetsApi
.
fetchDatasets
())
{
final
String
code
=
dataset
.
dataset
().
code
();
Variable
v
=
variableRepository
.
findOne
(
code
);
if
(
v
==
null
)
{
LOGGER
.
info
(
"Store additional variable {}"
,
v
.
getC
ode
()
);
LOGGER
.
info
(
"Store additional variable {}"
,
c
ode
);
v
=
new
Variable
(
code
);
variableRepository
.
save
(
v
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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