Make timeout configurable

This commit is contained in:
René Pfeuffer
2019-12-10 18:22:40 +01:00
parent 6f4074c21c
commit 8d0249b708
3 changed files with 22 additions and 5 deletions

View File

@@ -141,8 +141,8 @@ public class GitBrowseCommand extends AbstractGitCommand
} finally {
executorService.shutdown();
try {
if (!executorService.awaitTermination(10, TimeUnit.SECONDS)) {
logger.info("lookup of all commits took too long in repo {}", repository.getNamespaceAndName());
if (!executorService.awaitTermination(request.getComputationTimeoutMilliSeconds(), TimeUnit.MILLISECONDS)) {
logger.info("lookup of all commits aborted after {}ms in repo {}", request.getComputationTimeoutMilliSeconds(), repository.getNamespaceAndName());
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
@@ -259,8 +259,6 @@ public class GitBrowseCommand extends AbstractGitCommand
//~--- get methods ----------------------------------------------------------
private RevWalk commitWalk = null;
/**
* Method description
*