From eff27e646c8a1e3b74c8ae33612e90eff4ab5801 Mon Sep 17 00:00:00 2001 From: Bishal Prasad Date: Thu, 23 Mar 2023 10:23:51 +0530 Subject: [PATCH] Add paralleExecute index to logs --- dist/restore/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/restore/index.js b/dist/restore/index.js index 3a855e4..73898ca 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -28332,6 +28332,7 @@ class Batch { } this.concurrency = concurrency; this.emitter = new events.EventEmitter(); + this.index = 0; } /** * Add a operation into queue. @@ -28385,6 +28386,7 @@ class Batch { * */ parallelExecute() { + const local_index = this.index++; if (this.state === BatchStates.Error) { return; } @@ -28395,7 +28397,9 @@ class Batch { while (this.actives < this.concurrency) { const operation = this.nextOperation(); if (operation) { + console.log(`parallelExecute ${local_index} starting execution of operation ${this.operation}. Active count: ${this.actives}`); operation(); + console.log(`parallelExecute ${local_index} finished execution of operation ${this.operation}. Active count: ${this.actives}`); } else { return;