SUPPORT-9561: fix excerpt listener
This commit is contained in:
parent
5c00196056
commit
5e4dc38609
1 changed files with 5 additions and 0 deletions
|
|
@ -41,6 +41,10 @@ public class ExcerptListener {
|
|||
ExcerptResponse excerptResponse = objectMapper.readValue(kafkaResponse, ExcerptResponse.class);
|
||||
|
||||
if (!excerptResponse.getSuccess()) {
|
||||
if (excerptResponse.getData() != null) {
|
||||
data = excerptResponse.getData();
|
||||
excerptHistoryDao.delete(data.getOrgId(), data.getPrnOid());
|
||||
}
|
||||
throw new ExcerptResponseException(
|
||||
"Error with getting excerpt url " + excerptResponse.getMessage());
|
||||
}
|
||||
|
|
@ -48,6 +52,7 @@ public class ExcerptListener {
|
|||
|| excerptResponse.getData().getFileUrl().isEmpty()) {
|
||||
if (excerptResponse.getData() != null) {
|
||||
data = excerptResponse.getData();
|
||||
excerptHistoryDao.delete(data.getOrgId(), data.getPrnOid());
|
||||
}
|
||||
auditService.processDownloadEvent(data, 0, fileName, 1,
|
||||
AuditConstants.FAILURE_STATUS_TYPE, fileUrl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue