Skip to content

Commit

Permalink
fix: remove unneeded async signature from BulkWriter.sendBatch() (#1361)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Chen committed Nov 6, 2020
1 parent dc94946 commit b5cf449
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/src/bulk-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -798,10 +798,10 @@ export class BulkWriter {
batch: BulkCommitBatch,
batchQueue: BulkCommitBatch[],
batchCompletedDeferred: Deferred<void>
): Promise<void> {
): void {
const success = this._rateLimiter.tryMakeRequest(batch._opCount);
assert(success, 'Batch should be under rate limit to be sent.');
return batch.bulkCommit().then(() => {
batch.bulkCommit().then(() => {
// Remove the batch from the BatchQueue after it has been processed.
const batchIndex = batchQueue.indexOf(batch);
assert(batchIndex !== -1, 'The batch should be in the BatchQueue');
Expand Down

0 comments on commit b5cf449

Please sign in to comment.