Skip to content

Commit

Permalink
IndexBillRunsService comment corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Cruikshanks committed Apr 22, 2024
1 parent a8419a1 commit 0c34cb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/services/bill-runs/index-bill-runs.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ const PaginatorPresenter = require('../../presenters/paginator.presenter.js')
* @param {string} page - the page number of bill runs to be viewed
*
* @returns {Promise<Object>} an object representing the `pageData` needed by the index bill run template. It contains
* summary details for each bill run for the page selected, for the templates pagination control, the title and the
* status of busy bill runs
* summary details for each bill run for the page selected, the template's pagination control, the title and the
* status of any busy bill runs
*/
async function go (page) {
const selectedPageNumber = _selectedPageNumber(page)

// We expect the FetchBillRunsService to take longer to complete than CheckBusyBillRunsService. But running them
// together means we are only waiting as long as it takes rather than the combined time to run both queries
// together means we are only waiting as long as it takes FetchBillRunsService to complete rather than their combined
// time
const [fetchedBillRunResult, busyResult] = await Promise.all([
FetchBillRunsService.go(selectedPageNumber),
CheckBusyBillRunsService.go()
Expand Down

0 comments on commit 0c34cb8

Please sign in to comment.