mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
Fix number of running workers not being correct.
(This needs some work!)
This commit is contained in:
parent
37428fbe3b
commit
61bc5436a2
1 changed files with 3 additions and 1 deletions
|
@ -71,11 +71,11 @@ class WorkerWaiter {
|
|||
data: r.data,
|
||||
inputNum: r.data.inputNum
|
||||
});
|
||||
log.error(this.pendingInputs);
|
||||
if (this.pendingInputs.length > 0) {
|
||||
log.debug("Bake complete. Baking next input");
|
||||
this.bakeNextInput(r.data.inputNum);
|
||||
} else if (this.runningWorkers <= 0) {
|
||||
this.runningWorkers = 0;
|
||||
this.recipeConfig = undefined;
|
||||
this.options = undefined;
|
||||
this.progress = undefined;
|
||||
|
@ -84,6 +84,7 @@ class WorkerWaiter {
|
|||
}
|
||||
break;
|
||||
case "bakeError":
|
||||
this.runningWorkers -= 1;
|
||||
this.app.handleError(r.data);
|
||||
this.setBakingStatus(false);
|
||||
break;
|
||||
|
@ -213,6 +214,7 @@ class WorkerWaiter {
|
|||
|
||||
const initialInputs = input.slice(0, this.chefWorkers.length);
|
||||
this.pendingInputs = input.slice(this.chefWorkers.length, input.length);
|
||||
this.runningWorkers = 0;
|
||||
|
||||
for (let i = 0; i < initialInputs.length; i++) {
|
||||
this.runningWorkers += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue