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

Add new queued batch status #1965

Merged
merged 5 commits into from
Jan 24, 2023
Merged

Add new queued batch status #1965

merged 5 commits into from
Jan 24, 2023

Conversation

Cruikshanks
Copy link
Member

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

When a supplementary bill run is started, we'll be creating both a PRESROC and SROC one at the same time.

The PRESROC one will then begin processing (labelled as BUILDING in the UI) whilst the SROC one is queued waiting to be processed.

At the moment though, all we can do is initialise the SROC bill run with a status of processing as that is all that is available to us. In the UI this will give the impression both are building when their not.

So, we need to add a new queued status to the code and DB. We'll make it so all new bill runs are given this status initially. Then, once processing starts the status will be updated. This is what happens at the moment. The bill run is created and then a job is added to a 'queue' for it to be processed.

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

When a supplementary bill run is started, we'll be creating both a PRESROC and SROC one at the same time.

The PRESROC one will then begin `processing` (labelled as BUILDING in the UI) whilst the SROC one is `queued` waiting to be processed.

At the moment though, all we can do is initialise the SROC bill run with a status of processing as that is all that is available to us. In the UI this will give the impression both are building when their not.

So, we need to add a new `queued` status to the code and DB. We'll make it so all new bill runs are given this status initially. Then, once processing starts the status will be updated. This is what actually happens at the moment. The bill run is created and then a job is added to a 'queue' for it to be processed.
The previous team chose to create custom enum types. So, we need to make a change to the type used in `billing_batches` for status to allow our new `queued` value to be used.
@Cruikshanks Cruikshanks marked this pull request as ready for review January 23, 2023 10:02
Copy link
Contributor

@Jozzey Jozzey left a comment

Choose a reason for hiding this comment

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

Cruikshanks added a commit to DEFRA/water-abstraction-ui that referenced this pull request Jan 24, 2023
https://eaflood.atlassian.net/browse/WATER-3877

When a supplementary bill run is started, we'll be creating both a PRESROC and SROC one at the same time.

The PRESROC one will then begin `processing` (labelled as BUILDING in the UI) whilst the SROC one is `queued` waiting to be processed.

At the moment though, all we can do is initialise the SROC bill run with a status of `processing` as that is all that is available to us. In the UI this will give the impression both are building when they're not.

We've added a new `queued` status to [water-abstraction-service](DEFRA/water-abstraction-service#1965). This change updates the UI to add a new **QUEUED** badge and supports it.
Cruikshanks added a commit to DEFRA/water-abstraction-system that referenced this pull request Jan 24, 2023
https://eaflood.atlassian.net/browse/WATER-3877

When a supplementary bill run is started, we'll be creating both a PRESROC and SROC one at the same time.

The PRESROC one will then begin `processing` (labelled as BUILDING in the UI) whilst the SROC one is `queued` waiting to be processed.

At the moment though, all we can do is initialise the SROC bill run with a status of `processing` as that is all that is available to us. In the UI this will give the impression both are building when they're not.

We've added a new `queued` status to [water-abstraction-service](DEFRA/water-abstraction-service#1965) and support for it in [water-abstraction-ui](DEFRA/water-abstraction-ui#2271). This change updates changes the default status we apply to new bill runs to be `queued`.
@Cruikshanks Cruikshanks merged commit 31fff20 into main Jan 24, 2023
@Cruikshanks Cruikshanks deleted the add-new-queued-status branch January 24, 2023 07:34
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.

3 participants