Limit number of files that can be submitted, other bugfixes#73
Limit number of files that can be submitted, other bugfixes#73patrick-austin merged 2 commits into36_queuingfrom
Conversation
| response.missing.add(file); | ||
| } | ||
| } | ||
| JsonArray jsonArray = submitQuery(queryPrefix + chunkedFiles + querySuffix); |
There was a problem hiding this comment.
These 7 lines are a copy of those just above, so should go in a separate method to avoid duplication. There was some duplication previously but it is now worse with the use of the new response object and the additional values being populated.
| * @throws TopcatException | ||
| */ | ||
| public long getDatasetFileSize(long datasetId) throws TopcatException { | ||
| String query = "SELECT datafile.fileSize FROM Datafile datafile WHERE datafile.dataset.id = " + datasetId; |
There was a problem hiding this comment.
Is there a reason why you didn't use a SELECT SUM query here? I think the ICAT API supports them.
| /** | ||
| * Queue download of Datafiles by location, splitting into part Downloads if | ||
| * needed. | ||
| * Queue download of Datafiles by location, up to a configurable limit. |
There was a problem hiding this comment.
I think the return value in the javadoc needs updating. If I understand correctly it is no longer an array of download IDs but a single download ID and an array containing any missing files.
|
Also includes fix for a NullPointer when |
/queue/filesperformCheckwhen there's aprepardIdto use