Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect 2PT bill run request to match & allocate engine #705

Merged
merged 11 commits into from
Feb 5, 2024

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Jan 31, 2024

https://eaflood.atlassian.net/browse/WATER-4343

At this point the the SROC 2PT bilI run is created with a status of QUEUED and then … nothing.

We need to complete the final step after creating the bill run. water-abstraction-system now needs to PROCESS the bill run, triggering the new match & allocate engine, and updating the bill run status to REVIEW when it's complete. It also needs to handle marking the bill run as ERRORED should one be thrown, or EMPTY should there be no licences to bill.

https://eaflood.atlassian.net/browse/WATER-4343
At this point the the SROC 2PT bilI run is created with a status of `QUEUED` and then … nothing.

We need to complete the final step, after creating the bill run water-abstraction-system now needs to `PROCESS` the bill run, triggering the new match & allocate engine, and updating the bill run status to `REVIEW` when it's complete. It also needs to handle marking the bill run as `ERRORED` should one be thrown, or `EMPTY` should there be no licences to bill.
@Jozzey Jozzey added the enhancement New feature or request label Jan 31, 2024
@Jozzey Jozzey self-assigned this Jan 31, 2024
@Jozzey Jozzey marked this pull request as ready for review February 1, 2024 20:20
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it feels like a bit of a rewrite. But I'm rewriting the code @Cruikshanks wrote last year, not your code!

@Jozzey Jozzey requested a review from Cruikshanks February 5, 2024 11:42
@Jozzey
Copy link
Contributor Author

Jozzey commented Feb 5, 2024

Sonarcloud is complaining about the length of the _process function in the MatchAndAllocateService. We have already refactored out all of the actual processing that is going on in there. The function is now not much more than a series of nested forEach loops calling various services which I don't think can be refactored any further.

If we do any further refactoring of this function I think it will make it less clear what it is doing so I am going to override the SonarCloud issue for that particular service.

Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jozzey Jozzey merged commit bef4c16 into main Feb 5, 2024
6 checks passed
@Jozzey Jozzey deleted the connect-2pt-billing-engine branch February 5, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants