RED-6934: Fixed too long error message for cause field in db
This commit is contained in:
parent
e5d19b98d7
commit
a003071322
@ -166,14 +166,20 @@ public class FileStatusPersistenceService {
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateStatusErrorInfo(String fileId, FileErrorInfo fileErrorInfo) {
|
public void updateStatusErrorInfo(String fileId, FileErrorInfo fileErrorInfo) {
|
||||||
|
|
||||||
if (fileErrorInfo == null) {
|
if (fileErrorInfo == null) {
|
||||||
fileRepository.updateStatusErrorInfo(fileId, null, null, null, null);
|
fileRepository.updateStatusErrorInfo(fileId, null, null, null, null);
|
||||||
} else {
|
} else {
|
||||||
fileRepository.updateStatusErrorInfo(fileId, fileErrorInfo.getCause(), fileErrorInfo.getQueue(), fileErrorInfo.getService(), fileErrorInfo.getTimestamp());
|
fileRepository.updateStatusErrorInfo(fileId,
|
||||||
|
fileErrorInfo.getCause().substring(0, Math.min(fileErrorInfo.getCause().length(), 255)),
|
||||||
|
fileErrorInfo.getQueue(),
|
||||||
|
fileErrorInfo.getService(),
|
||||||
|
fileErrorInfo.getTimestamp());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateProcessingStatus(String fileId, ProcessingStatus processingStatus) {
|
public void updateProcessingStatus(String fileId, ProcessingStatus processingStatus) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user