mirror of
https://github.com/Qortal/qortal.git
synced 2025-06-03 06:56:58 +00:00
Disregard exceptions in the bootstrap creation cleanup process because these don't affect the created bootstrap - instead just log the exception and full stack trace.
This commit is contained in:
parent
a3dcacade9
commit
f6c1a7e6db
@ -278,21 +278,33 @@ public class Bootstrap {
|
|||||||
throw new DataException(String.format("Unable to create bootstrap due to timeout: %s", e.getMessage()));
|
throw new DataException(String.format("Unable to create bootstrap due to timeout: %s", e.getMessage()));
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
LOGGER.info("Re-importing local data...");
|
try {
|
||||||
Path exportPath = HSQLDBImportExport.getExportDirectory(false);
|
LOGGER.info("Re-importing local data...");
|
||||||
repository.importDataFromFile(Paths.get(exportPath.toString(), "TradeBotStates.json").toString());
|
Path exportPath = HSQLDBImportExport.getExportDirectory(false);
|
||||||
repository.importDataFromFile(Paths.get(exportPath.toString(), "MintingAccounts.json").toString());
|
repository.importDataFromFile(Paths.get(exportPath.toString(), "TradeBotStates.json").toString());
|
||||||
|
repository.importDataFromFile(Paths.get(exportPath.toString(), "MintingAccounts.json").toString());
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOGGER.info("Unable to re-import local data, but created bootstrap is still valid. {}", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
LOGGER.info("Unlocking blockchain...");
|
||||||
blockchainLock.unlock();
|
blockchainLock.unlock();
|
||||||
|
|
||||||
// Cleanup
|
// Cleanup
|
||||||
if (inputPath != null) {
|
LOGGER.info("Cleaning up...");
|
||||||
FileUtils.deleteDirectory(inputPath.toFile());
|
try {
|
||||||
|
if (inputPath != null) {
|
||||||
|
FileUtils.deleteDirectory(inputPath.toFile());
|
||||||
|
}
|
||||||
|
if (outputPath != null) {
|
||||||
|
FileUtils.deleteDirectory(outputPath.toFile());
|
||||||
|
}
|
||||||
|
this.deleteAllTempDirectories();
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOGGER.info("Error during cleanup, but created bootstrap is still valid. {}", e);
|
||||||
}
|
}
|
||||||
if (outputPath != null) {
|
|
||||||
FileUtils.deleteDirectory(outputPath.toFile());
|
|
||||||
}
|
|
||||||
this.deleteAllTempDirectories();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user