Skip to content

Commit

Permalink
Vain yksi manifest-tiedosto
Browse files Browse the repository at this point in the history
  • Loading branch information
augustk committed Jan 17, 2025
1 parent e1da38d commit 641d5d4
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public LampiSiirtajaService(final Config config) {
public void run() throws Exception {
DatabaseToS3 db = new DatabaseToS3(config);

List<ManifestItem> manifestItems = new ArrayList<>();

Stream.of("pub", "dw")
// Stream.of("pub")
.forEach(
Expand All @@ -38,7 +40,6 @@ public void run() throws Exception {
db.exportTablesToS3(schemaName, tableNames);
LOG.info("Scheman {} datojen vienti Ovaran AWS S3-ämpäriin valmistui", schemaName);
LOG.info("Aloitetaan scheman {} tiedostojen siirto Lammen S3-ämpäriin", schemaName);
List<ManifestItem> manifestItems = new ArrayList<>();
exportToS3Results.forEach(
(tableName, s3ExportResult) -> {
int numberOfFiles = s3ExportResult.getFiles_uploaded();
Expand All @@ -62,13 +63,13 @@ public void run() throws Exception {
throw new RuntimeException(e);
}
});
LOG.info("Siirretään manifest.json Lampeen");
LampiS3Transfer manifestTransfer = new LampiS3Transfer(config);
manifestTransfer.uploadManifest(manifestItems);
LOG.info("Scheman {} tiedostojen siirto Lammen S3-ämpäriin valmistui", schemaName);
} catch (Exception e) {
throw new RuntimeException(e);
}
});
LOG.info("Siirretään manifest.json Lampeen");
LampiS3Transfer manifestTransfer = new LampiS3Transfer(config);
manifestTransfer.uploadManifest(manifestItems);
}
}

0 comments on commit 641d5d4

Please sign in to comment.