Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #85 from pgerbes1/master
Browse files Browse the repository at this point in the history
Queries will use available secondaries instead of primary
  • Loading branch information
braydonf committed Oct 12, 2017
2 parents 98ee562 + 9aebfb4 commit e9013ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/queries/generate-debits.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const calculateUserAmountOwedForStorage = function(billingPeriodStart, billingPe
])
.cursor({batchSize: 100, async: true})
.allowDiskUse(true)
.read('secondaryPreferred')
.exec()
.then(cursor => {
const insertPromises = [];
Expand Down Expand Up @@ -195,6 +196,7 @@ const calculateUserAmountOwedForBandwidth = function(billingPeriodStart, billing
])
.cursor({batchSize: 100, async: true})
.allowDiskUse(true)
.read('secondaryPreferred')
.exec()
.then(cursor => {
const insertPromises = [];
Expand Down

0 comments on commit e9013ee

Please sign in to comment.