dbf-exporter http://jira.mfd.msk:8088/browse/CLS-489 добавил логи
This commit is contained in:
parent
622ea90e81
commit
f54efc6b2b
3 changed files with 5 additions and 3 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue