dbf-exporter http://jira.mfd.msk:8088/browse/CLS-489 добавил логи

This commit is contained in:
AKurakin 2023-08-23 20:18:17 +03:00
parent 622ea90e81
commit f54efc6b2b
3 changed files with 5 additions and 3 deletions

View file

@ -115,12 +115,13 @@ public class ExportFromHazelcast extends Stage implements InitializingBean {
return StageResult.ERROR; return StageResult.ERROR;
} finally { } finally {
if (!writeOk || emptyMap) { if (!writeOk || emptyMap) {
log.debug("Delete empty DBF temp file \"{}\"", resultContainer.getFileForExport());
boolean deleteOk = resultContainer.getFileForExport().delete(); boolean deleteOk = resultContainer.getFileForExport().delete();
if (!deleteOk) { if (!deleteOk) {
log.warn("Can't delete file {}", resultContainer.getFileForExport().getName()); log.warn("Can't delete file {}", resultContainer.getFileForExport().getName());
} }
} } else {
if (writeOk) { log.debug("uuid {}, send to SFTP", resultContainer.getUuid());
gateway.sendToSftp(dbfFile); gateway.sendToSftp(dbfFile);
} }
} }

View file

@ -54,6 +54,7 @@ public class Journal extends Stage implements InitializingBean {
//удалим временный файл //удалим временный файл
File dbfFile = resultContainer.getFileForExport(); File dbfFile = resultContainer.getFileForExport();
try { try {
log.debug("Uuid {}, delete tem file \"{}\"", resultContainer.getUuid(), dbfFile);
Files.deleteIfExists(dbfFile.toPath()); Files.deleteIfExists(dbfFile.toPath());
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);

View file

@ -53,7 +53,7 @@ public class PrepareDBFFile extends Stage implements InitializingBean {
return StageResult.ERROR; return StageResult.ERROR;
} }
resultContainer.setFileForExport(dbfFile); resultContainer.setFileForExport(dbfFile);
log.debug("uuid {}. GenerationId {} will be export to file \"{}\"", resultContainer.getUuid(), log.debug("uuid {}. GenerationId {} will be export to temp file \"{}\"", resultContainer.getUuid(),
resultContainer.getGroupId(), dbfFile); resultContainer.getGroupId(), dbfFile);
return StageResult.OK; return StageResult.OK;
} }