Merge branch 'RED-9837-4.1' into 'release/4.348.x'
RED-9837: Fixed not working timeout with endless loop in drools then block See merge request redactmanager/redaction-service!490
This commit is contained in:
commit
0692cc90e4
@ -95,8 +95,7 @@ public class ComponentDroolsExecutionService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
completableFuture.orTimeout(settings.getDroolsExecutionTimeoutSecs(document.getNumberOfPages()), TimeUnit.SECONDS)
|
completableFuture.get(settings.getDroolsExecutionTimeoutSecs(document.getNumberOfPages()), TimeUnit.SECONDS);
|
||||||
.get();
|
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
kieSession.dispose();
|
kieSession.dispose();
|
||||||
if (e.getCause() instanceof TimeoutException) {
|
if (e.getCause() instanceof TimeoutException) {
|
||||||
@ -106,6 +105,8 @@ public class ComponentDroolsExecutionService {
|
|||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
kieSession.dispose();
|
kieSession.dispose();
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
} catch (TimeoutException e) {
|
||||||
|
throw new DroolsTimeoutException(e, false, RuleFileType.COMPONENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<FileAttribute> resultingFileAttributes = getFileAttributes(kieSession);
|
List<FileAttribute> resultingFileAttributes = getFileAttributes(kieSession);
|
||||||
|
|||||||
@ -129,8 +129,7 @@ public class EntityDroolsExecutionService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
completableFuture.orTimeout(settings.getDroolsExecutionTimeoutSecs(document.getNumberOfPages()), TimeUnit.SECONDS)
|
completableFuture.get(settings.getDroolsExecutionTimeoutSecs(document.getNumberOfPages()), TimeUnit.SECONDS);
|
||||||
.get();
|
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
kieSession.dispose();
|
kieSession.dispose();
|
||||||
if (e.getCause() instanceof TimeoutException) {
|
if (e.getCause() instanceof TimeoutException) {
|
||||||
@ -140,6 +139,8 @@ public class EntityDroolsExecutionService {
|
|||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
kieSession.dispose();
|
kieSession.dispose();
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
} catch (TimeoutException e) {
|
||||||
|
throw new DroolsTimeoutException(e, false, RuleFileType.ENTITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<FileAttribute> resultingFileAttributes = getFileAttributes(kieSession);
|
List<FileAttribute> resultingFileAttributes = getFileAttributes(kieSession);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user