Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/org/icatproject/topcat/StatusCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ private void performCheck(Download download, IdsClient injectedIdsClient) {
idsClient = new IdsClient(getDownloadUrl(download.getFacilityName(),download.getTransport()));
}
if(!download.getIsEmailSent() && download.getStatus() == DownloadStatus.COMPLETE){
logger.info("Download COMPLETE for " + download.getFileName() + "; checking whether to send email...");
logger.info("Download COMPLETE for " + download.getFileName() + " " + download.getId() + "; checking whether to send email...");
download.setIsEmailSent(true);
em.persist(download);
em.flush();
lastChecks.remove(download.getId());
sendDownloadReadyEmail(download);
} else if(download.getTransport().matches("https|http") && idsClient.isPrepared(download.getPreparedId())){
logger.info("Download (http[s]) for " + download.getFileName() + " is Prepared, so setting COMPLETE and checking email...");
logger.info("Download (http[s]) for " + download.getFileName() + " " + download.getId() + " is Prepared, so setting COMPLETE and checking email...");
download.setStatus(DownloadStatus.COMPLETE);
download.setCompletedAt(new Date());
download.setIsEmailSent(true);
Expand Down Expand Up @@ -290,10 +290,10 @@ public static void prepareDownload(DownloadRepository downloadRepository, Downlo
}

if (download.getIsTwoLevel() || !download.getTransport().matches("https|http")) {
logger.info("Setting Download status RESTORING for " + download.getFileName());
logger.info("Setting Download status RESTORING for " + download.getFileName() + " " + download.getId());
download.setStatus(DownloadStatus.RESTORING);
} else {
logger.info("Setting Download status COMPLETE for " + download.getFileName());
logger.info("Setting Download status COMPLETE for " + download.getFileName() + " " + download.getId());
download.setStatus(DownloadStatus.COMPLETE);
download.setCompletedAt(new Date());
}
Expand Down