Skip to content

Commit 77736cd

Browse files
committed
CLIS-83 Fix pause/resume fingerprint queue
1 parent 083feb1 commit 77736cd

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Diff for: src/sdk/scanner/Dispatcher/Dispatcher.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class Dispatcher extends EventEmitter {
117117
if (!this.globalAbortController.isAborting()) {
118118

119119
if (error.name === 'AbortError') {
120-
error.message = `The packet with request id ${disptItem.uuid} was sent ${this.scannerCfg.MAX_RETRIES_FOR_RECOVERABLES_ERRORS} times and there was a timeout for each retry`
120+
error.message = `Timeout reached for packet with request ID ${disptItem.uuid}. Enqueuing again.`
121121
error.name = 'TIMEOUT';
122122
}
123123

Diff for: src/sdk/scanner/Scanner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class Scanner extends EventEmitter {
157157
this.appendFilesToNotScanned(filesNotScanned);
158158
});
159159

160-
this.wfpProvider.on(ScannerEvents.DISPATCHER_LOG, (msg) => {
160+
this.dispatcher.on(ScannerEvents.DISPATCHER_LOG, (msg) => {
161161
this.reportLog(msg);
162162
});
163163

Diff for: src/sdk/scanner/ScannerCfg.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ export class ScannerCfg extends BaseConfig {
1515
public IGNORE_CERT_ERRORS = false;
1616

1717
// Level of concurrency
18-
public CONCURRENCY_LIMIT = 15;
18+
public CONCURRENCY_LIMIT = 10;
1919

2020
// Timeout for each transaction
21-
public TIMEOUT = 60000;
21+
public TIMEOUT = 180000;
2222

2323
// The maximum size for each .wfp file
2424
public WFP_FILE_MAX_SIZE = 64 * 1000;
@@ -37,8 +37,8 @@ export class ScannerCfg extends BaseConfig {
3737
// Persist results after [ X ] server responses
3838
public MAX_RESPONSES_IN_BUFFER = 300;
3939

40-
public DISPATCHER_QUEUE_SIZE_MAX_LIMIT = 300;
40+
public DISPATCHER_QUEUE_SIZE_MAX_LIMIT = 2000;
4141

42-
public DISPATCHER_QUEUE_SIZE_MIN_LIMIT = 200;
42+
public DISPATCHER_QUEUE_SIZE_MIN_LIMIT = 1000;
4343

4444
};

Diff for: src/sdk/scanner/WfpProvider/WfpCalculator/WfpCalculator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ export class WfpCalculator extends WfpProvider {
419419
// Files: contains all files winnowed but not packed yet
420420
const files = new FingerprintPackage(this.wfp, this.folderRoot).getFilesFingerprinted();
421421
if (files.length) {
422-
const lastFileWinnowed = files[files.length - 1];
422+
const lastFileWinnowed = this.folderRoot + files[files.length - 1];
423423
let i = 0;
424424
while (i <= files.length && lastFileWinnowed !== this.fileList[this.fileListIndex - i]) {
425425
i += 1;

0 commit comments

Comments
 (0)