Skip to content

Commit

Permalink
Remove JAS scanners timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Or-Geva committed Nov 14, 2023
1 parent 6f6d898 commit 4c20e95
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/com/jfrog/ide/idea/scan/ScanManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@
import static com.jfrog.ide.common.utils.XrayConnectionUtils.createXrayClientBuilder;

public class ScanManager {
private final int SCAN_TIMEOUT_MINUTES = 60;
private final Project project;
private final ScannerFactory factory;
private final SourceCodeScannerManager sourceCodeScannerManager;
private Map<Integer, ScannerBase> scanners = Maps.newHashMap();
private ExecutorService executor;


private ScanManager(@NotNull Project project) {
this.project = project;
factory = new ScannerFactory(project);
Expand Down Expand Up @@ -97,8 +95,8 @@ public void startScan() {
scanner.asyncScanAndUpdateResults();
}
executor.shutdown();
if (!executor.awaitTermination(SCAN_TIMEOUT_MINUTES, TimeUnit.MINUTES)) {
logError(Logger.getInstance(), "Scan timeout of " + SCAN_TIMEOUT_MINUTES + " minutes elapsed. The scan is being canceled.", true);
if (!executor.awaitTermination(Long.MAX_VALUE, TimeUnit.MINUTES)) {
logError(Logger.getInstance(), "Scan timeout elapsed. The scan is being canceled.", true);
}
// Cache tree only if no errors occurred during scan.
if (scanners.values().stream().anyMatch(ScannerBase::isScanErrorOccurred)) {
Expand Down

0 comments on commit 4c20e95

Please sign in to comment.