Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
VIPS
VIPSLogic
Commits
978c28a2
Commit
978c28a2
authored
8 months ago
by
Lene Wasskog
Browse files
Options
Downloads
Patches
Plain Diff
log: Error log exception, do not swallow it
parent
81bad0c0
No related branches found
No related tags found
1 merge request
!191
Add map module and Open-Meteo support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/no/nibio/vips/logic/service/ModelFormService.java
+8
-3
8 additions, 3 deletions
...in/java/no/nibio/vips/logic/service/ModelFormService.java
with
8 additions
and
3 deletions
src/main/java/no/nibio/vips/logic/service/ModelFormService.java
+
8
−
3
View file @
978c28a2
...
@@ -53,6 +53,8 @@ import no.nibio.vips.util.ParseRESTParamUtil;
...
@@ -53,6 +53,8 @@ import no.nibio.vips.util.ParseRESTParamUtil;
import
no.nibio.vips.util.WeatherUtil
;
import
no.nibio.vips.util.WeatherUtil
;
import
no.nibio.vips.util.XDate
;
import
no.nibio.vips.util.XDate
;
import
no.nibio.vips.util.weather.WeatherDataSourceUtil
;
import
no.nibio.vips.util.weather.WeatherDataSourceUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
/**
* This is a collection of (one) service(s) for models run from forms (not as part of batch)
* This is a collection of (one) service(s) for models run from forms (not as part of batch)
...
@@ -62,7 +64,9 @@ import no.nibio.vips.util.weather.WeatherDataSourceUtil;
...
@@ -62,7 +64,9 @@ import no.nibio.vips.util.weather.WeatherDataSourceUtil;
@Path
(
"rest/modelform"
)
@Path
(
"rest/modelform"
)
@Facet
(
"restricted"
)
@Facet
(
"restricted"
)
public
class
ModelFormService
{
public
class
ModelFormService
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ModelFormService
.
class
);
@EJB
@EJB
UserBean
userBean
;
UserBean
userBean
;
@EJB
@EJB
...
@@ -196,14 +200,15 @@ public class ModelFormService {
...
@@ -196,14 +200,15 @@ public class ModelFormService {
Integer
VIPSCoreUserId
=
organization
.
getDefaultVipsCoreUserId
();
Integer
VIPSCoreUserId
=
organization
.
getDefaultVipsCoreUserId
();
List
<
Result
>
results
=
forecastBean
.
runForecast
(
mConf
,
VIPSCoreUserId
);
List
<
Result
>
results
=
forecastBean
.
runForecast
(
mConf
,
VIPSCoreUserId
);
return
Response
.
ok
().
entity
(
results
).
build
();
return
Response
.
ok
().
entity
(
results
).
build
();
}
}
catch
(
PreprocessorException
|
RunModelException
ex
)
catch
(
PreprocessorException
|
RunModelException
ex
)
{
{
LOGGER
.
error
(
"Exception occurred when attempting to run the septoria humidity model"
,
ex
);
return
Response
.
serverError
().
entity
(
ex
.
getMessage
()).
build
();
return
Response
.
serverError
().
entity
(
ex
.
getMessage
()).
build
();
}
}
}
}
private
ForecastModelConfiguration
getForecastModelConfiguration
(
String
modelId
,
String
key
,
String
value
)
private
ForecastModelConfiguration
getForecastModelConfiguration
(
String
modelId
,
String
key
,
String
value
)
...
...
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