Skip to content

Commit

Permalink
Fix elaboration-ms chart
Browse files Browse the repository at this point in the history
  • Loading branch information
ainnocenti2011 committed Feb 11, 2025
1 parent 9e4b40e commit 01ee73f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ jobs:
with:
push: true
# tags: ${{ env.DOCKER_IMAGES }}
tags: "ghcr.io/glaciation-heu/mef-sog-uc1/elaboration-timb-ms:2.0.0"
tags: "ghcr.io/glaciation-heu/mef-sog-uc1/elaboration-timb-ms:2.0.1"
# labels: ${{ steps.meta.outputs.labels }}
context: "${{ github.workspace }}/workload-core/elaboration-timb-ms"
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,6 @@ public void letturaFornitura(String pathToFile) throws JAXBException, IOExceptio
Files.move(fileInProgress, Paths.get(pathDiscarded+File.separator+topic+File.separator+fileInProgress.toFile().getName()), StandardCopyOption.REPLACE_EXISTING);
} else {
Files.move(fileInProgress, Paths.get(pathCompleted+File.separator+topic+File.separator+fileInProgress.toFile().getName()), StandardCopyOption.REPLACE_EXISTING);
if (minioEnabled) {
try {
minioService.uploadObject(fileInProgress.toFile().getName(), pathCompleted+File.separator+topic+File.separator+fileInProgress.toFile().getName());
} catch (ServerException e) {
throw new RuntimeException(e);
} catch (InsufficientDataException e) {
throw new RuntimeException(e);
} catch (ErrorResponseException e) {
throw new RuntimeException(e);
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
} catch (InvalidKeyException e) {
throw new RuntimeException(e);
} catch (InvalidResponseException e) {
throw new RuntimeException(e);
} catch (XmlParserException e) {
throw new RuntimeException(e);
} catch (InternalException e) {
throw new RuntimeException(e);
}
}
}

writeElaboratedFile(fileInProgress, esito);
Expand All @@ -140,7 +119,7 @@ public void letturaFornitura(String pathToFile) throws JAXBException, IOExceptio
* @param esito
* @throws JAXBException
*/
private void writeElaboratedFile(Path filePath, TimbraturaEsitoLettura esito) throws JAXBException {
private void writeElaboratedFile(Path filePath, TimbraturaEsitoLettura esito) throws JAXBException, IOException {
DettaglioElaborazione ft = new DettaglioElaborazione(filePath.toFile().getName().replaceFirst("^[0-9]{14}-", ""));
ft.setEsito(esito.getStatoAcquisizioneFinale().getLabelStato());
ft.setTotalNumber(esito.getTimbrAcquisite().size() + esito.getRawScartate().size());
Expand All @@ -157,5 +136,15 @@ private void writeElaboratedFile(Path filePath, TimbraturaEsitoLettura esito) th
File file = new File(pathElaborated + File.separator + topic + File.separator
+ filePath.toFile().getName().substring(0, filePath.toFile().getName().lastIndexOf(".")) + RESULT_EXTENSION);
jaxbMarshaller.marshal(ft, file);

if (minioEnabled) {
try {
minioService.uploadObject(filePath.toFile().getName(), filePath.toFile().getAbsolutePath());
} catch (ServerException | InsufficientDataException | ErrorResponseException |
NoSuchAlgorithmException | InvalidKeyException | InvalidResponseException |
XmlParserException | InternalException e) {
throw new RuntimeException(e);
}
}
}
}

0 comments on commit 01ee73f

Please sign in to comment.