Skip to content

Commit

Permalink
got rid of the seemingly unnecessary method updateLastExportTimeStamp…
Browse files Browse the repository at this point in the history
…() in the dataset service bean. (#8484)
  • Loading branch information
landreev committed Jul 19, 2022
1 parent bb55a66 commit 8135490
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -842,11 +842,6 @@ public String getReminderString(Dataset dataset, boolean canPublishDataset, bool
}
}

public void updateLastExportTimeStamp(Long datasetId) {
Date now = new Date();
em.createNativeQuery("UPDATE Dataset SET lastExportTime='"+now.toString()+"' WHERE id="+datasetId).executeUpdate();
}

public Dataset setNonDatasetFileAsThumbnail(Dataset dataset, InputStream inputStream) {
if (dataset == null) {
logger.fine("In setNonDatasetFileAsThumbnail but dataset is null! Returning null.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void exportAllFormats(Dataset dataset) {
ExportService exportServiceInstance = ExportService.getInstance();
logger.log(Level.FINE, "Attempting to run export on dataset {0}", dataset.getGlobalId());
exportServiceInstance.exportAllFormats(dataset);
datasetService.updateLastExportTimeStamp(dataset.getId());
dataset = datasetService.merge(dataset);
} catch (ExportException ee) {logger.fine("Caught export exception while trying to export. (ignoring)");}
catch (Exception e) {logger.fine("Caught unknown exception while trying to export (ignoring)");}
}
Expand All @@ -242,7 +242,7 @@ public void exportAllFormatsInNewTransaction(Dataset dataset) throws ExportExcep
try {
ExportService exportServiceInstance = ExportService.getInstance();
exportServiceInstance.exportAllFormats(dataset);
datasetService.updateLastExportTimeStamp(dataset.getId());
dataset = datasetService.merge(dataset);
} catch (Exception e) {
logger.fine("Caught unknown exception while trying to export");
throw new ExportException(e.getMessage());
Expand Down

0 comments on commit 8135490

Please sign in to comment.