Skip to content

Commit 71c80e7

Browse files
committed
fixup on code post reviews
1 parent 711deb2 commit 71c80e7

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

CountItems/CountManager.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,7 @@ class CountManager {
175175
this.store.buckets += bucketCount;
176176
this.store.bucketList = this.store.bucketList.concat(transformedInfos);
177177
bucketInfos.forEach(bucketInfo => {
178-
this.q.push({bucketInfo}, err => {
179-
if (err) {
180-
this.log.error('error processing bucket', {
181-
error: err,
182-
method: 'CountManager::addWork',
183-
});
184-
}
185-
}
186-
);
178+
this.q.push(bucketInfo);
187179
});
188180
this.log.debug('added work', {
189181
workInQueue: this.q.length(),
@@ -206,6 +198,10 @@ class CountManager {
206198
.forEach(worker => this.workerList.push(worker.id));
207199
}
208200
this.q.error(err => {
201+
this.log.error('error processing bucket', {
202+
error: err,
203+
method: 'CountManager::addWork',
204+
});
209205
this.q.pause();
210206
this.q.kill();
211207
return process.nextTick(onceCB, err);

CountItems/CountWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CountWorker {
3636
if (bucketInfoObj._websiteConfiguration) {
3737
Object.assign(bucketInfoObj, { _websiteConfiguration: null });
3838
}
39-
const bucketInfo = BucketInfo.fromObj(bucketInfoObj.bucketInfo ? bucketInfoObj.bucketInfo : bucketInfoObj);
39+
const bucketInfo = BucketInfo.fromObj(bucketInfoObj.bucketInfo || bucketInfoObj);
4040
const bucketName = bucketInfo.getName();
4141
this.log.info(`${process.pid} handling ${bucketName}`);
4242
return async.waterfall([

compareBuckets/compareBuckets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function compareBuckets(params, log, cb) {
224224
err => {
225225
statusObj.dstBucketInProgress = null;
226226
statusObj.srcBucketInProgress = null;
227-
cb(err, statusObj);
227+
cb(err);
228228
}
229229
);
230230
}

0 commit comments

Comments
 (0)