-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reissuing to
ProcessBillingBatchService
(#290)
https://eaflood.atlassian.net/browse/WATER-4036 We update `ProcessBillingBatchService` to call our new `ReissueInvoicesService`. This has involved a small refactor to `ProcessBillingBatchService` so that each stage is called in its own function, leaving the main `go` function clean. We also hide the reissuing behind a feature flag, which is set by `ENABLE_REISSUING_BILLING_BATCHES` in `.env`. This enables us to selectively enable reissuing in environments so that it isn't prematurely deployed.
- Loading branch information
Showing
5 changed files
with
130 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict' | ||
|
||
/** | ||
* Config values used to enable feature flags | ||
* @module FeatureFlagsConfig | ||
*/ | ||
|
||
// We require dotenv directly in each config file to support unit tests that depend on this this subset of config. | ||
// Requiring dotenv in multiple places has no effect on the app when running for real. | ||
require('dotenv').config() | ||
|
||
const config = { | ||
// Credit to https://stackoverflow.com/a/323546/6117745 for how to handle | ||
// converting the env var to a boolean | ||
enableReissuingBillingBatches: (String(process.env.ENABLE_REISSUING_BILLING_BATCHES) === 'true') || false | ||
} | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters