Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Exporter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
URBANITE
Open
Data Management Platform
Harvester
Exporter
Commits
8d6a5cd8
Commit
8d6a5cd8
authored
2 years ago
by
Jastrow, Torben
Browse files
Options
Downloads
Patches
Plain Diff
add failure code to logging
parent
b7eea0e6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/io/piveau/consus/ExportingDataStorageVerticle.java
+4
-4
4 additions, 4 deletions
...n/java/io/piveau/consus/ExportingDataStorageVerticle.java
with
4 additions
and
4 deletions
src/main/java/io/piveau/consus/ExportingDataStorageVerticle.java
+
4
−
4
View file @
8d6a5cd8
...
...
@@ -53,14 +53,14 @@ public class ExportingDataStorageVerticle extends AbstractVerticle {
CompositeFuture
.
all
(
exports
)
.
onSuccess
(
success
->
pipeContext
.
log
().
info
(
"Successfully exported [{}] to data storage"
,
id
))
.
onFailure
(
failure
->
pipeContext
.
log
().
error
(
"Failed to export [{}] to data storage"
,
id
,
failure
));
.
onFailure
(
failure
->
pipeContext
.
log
().
error
(
"Failed to export [{}] to data storage
: {}
"
,
id
,
failure
));
}
private
Future
<
Void
>
exportToDataStorage
(
PipeContext
pipeContext
,
String
datastoreUrl
)
{
return
Future
.
future
(
export
->
CompositeFuture
.
all
(
exportData
(
pipeContext
,
datastoreUrl
),
exportMetadata
(
pipeContext
,
datastoreUrl
))
.
onSuccess
(
success
->
export
.
complete
())
.
onFailure
(
failure
->
pipeContext
.
log
().
error
(
"Failed to export [{}] to data storage"
,
datastoreUrl
,
failure
)));
.
onFailure
(
failure
->
pipeContext
.
log
().
error
(
"Failed to export [{}] to data storage
: {}
"
,
datastoreUrl
,
failure
)));
}
private
Future
<
Void
>
exportMetadata
(
PipeContext
pipeContext
,
String
datastoreUrl
)
{
...
...
@@ -86,7 +86,7 @@ public class ExportingDataStorageVerticle extends AbstractVerticle {
exportMetadata
.
complete
();
})
.
onFailure
(
failure
->
{
pipeContext
.
log
().
error
(
"Failed to insert/update metadata [{}]"
,
encodedId
,
failure
);
pipeContext
.
log
().
error
(
"Failed to insert/update metadata [{}]
: {}
"
,
encodedId
,
failure
);
exportMetadata
.
fail
(
failure
);
});
});
...
...
@@ -108,7 +108,7 @@ public class ExportingDataStorageVerticle extends AbstractVerticle {
+
model
+
"/"
+
city
;
pipeContext
.
log
().
info
(
"Exporting data to [{}]"
,
datastoreUrl_
);
pipeContext
.
log
().
info
(
"Exporting data
[{}]
to [{}]"
,
id
,
datastoreUrl_
);
pipeContext
.
log
().
debug
(
"Data: {}"
,
new
JsonObject
(
pipeContext
.
getStringData
()).
getJsonArray
(
"data"
));
client
.
postAbs
(
url
)
...
...
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