Insert only the records with uploaded-to-S3 full-texts, in the "payload" table.
This commit is contained in:
parent
71f6b46130
commit
dfd40cb105
|
@ -279,11 +279,15 @@ public class UrlController {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String fileLocation = payload.getLocation();
|
||||||
|
if ( fileLocation == null ) // We want only the records with uploaded full-texts in the "payload" table.
|
||||||
|
continue;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Long size = payload.getSize();
|
Long size = payload.getSize();
|
||||||
Object[] args = new Object[] {payload.getId(), payload.getOriginal_url(), payload.getActual_url(), payload.getTimestamp_acquired(),
|
Object[] args = new Object[] {payload.getId(), payload.getOriginal_url(), payload.getActual_url(), payload.getTimestamp_acquired(),
|
||||||
payload.getMime_type(), (size != null) ? String.valueOf(size) : null, payload.getHash(),
|
payload.getMime_type(), (size != null) ? String.valueOf(size) : null, payload.getHash(),
|
||||||
payload.getLocation(), payload.getProvenance()};
|
fileLocation, payload.getProvenance()};
|
||||||
|
|
||||||
jdbcTemplate.update(insertIntoPayloadBaseQuery, args, payloadArgTypes);
|
jdbcTemplate.update(insertIntoPayloadBaseQuery, args, payloadArgTypes);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue