Skip to content

Commit a2128cf

Browse files
committed
Refactor: pass scanId as parameter instead of instance field
In this commit we refactor conductorScanId to be passed as a parameter through the call chain instead of storing it as an instance field (_scanId), as scanId is only relevant within the context of a single scan execution passing it as a parameter makes dependencies explicit and Reduces instance state and improves code clarity Issue: BB-740
1 parent be36ee6 commit a2128cf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

extensions/lifecycle/conductor/LifecycleConductor.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ class LifecycleConductor {
488488
log.error('lifecycle batch failed', {
489489
error: err,
490490
unknownCanonicalIds,
491-
conductorScanId: this._scanId,
491+
conductorScanId: scanId,
492492
fullScanElapsedMs: elapsedMs,
493493
nBucketsListed,
494494
workflowsQueued: messageDeliveryReports,
@@ -503,7 +503,7 @@ class LifecycleConductor {
503503
nBucketsQueued,
504504
nLifecycledBuckets,
505505
unknownCanonicalIds,
506-
conductorScanId: this._scanId,
506+
conductorScanId: scanId,
507507
fullScanElapsedMs: elapsedMs,
508508
nBucketsListed,
509509
workflowsQueued: messageDeliveryReports,
@@ -532,7 +532,7 @@ class LifecycleConductor {
532532
});
533533
}
534534

535-
listZookeeperBuckets(queue, log, cb) {
535+
listZookeeperBuckets(queue, scanId, log, cb) {
536536
const zkBucketsPath = this.getBucketsZkPath();
537537
this._zkClient.getChildren(
538538
zkBucketsPath,
@@ -615,7 +615,7 @@ class LifecycleConductor {
615615
});
616616
}
617617

618-
listBucketdBuckets(queue, initMarker, log, cb) {
618+
listBucketdBuckets(queue, initMarker, scanId, log, cb) {
619619
let isTruncated = true;
620620
let marker = initMarker;
621621
let nEnqueued = 0;
@@ -716,7 +716,7 @@ class LifecycleConductor {
716716
);
717717
}
718718

719-
listMongodbBuckets(queue, log, cb) {
719+
listMongodbBuckets(queue, scanId, log, cb) {
720720
let nEnqueued = 0;
721721
const start = new Date();
722722

0 commit comments

Comments
 (0)