-
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.
Rename Import job as Licence Changes and refactor (#1593)
https://eaflood.atlassian.net/browse/WATER-4728 After completing [Remove the replacement legacy import code](#1585) we could review the replacement 'import job' we created in a clearer light. The immediate thing that rang out was that we are not importing a license! The job is connected to the import licence process, but specifically, it cares about changes to the licence. Hence the name change. After that, we could see the job and the two downstream processes it kicks off from a bird's eye view. What jumped out is they were both doing there own variation of the same thing: working out what the 'change date' is. Plus, in the case of return logs it was re-quering the DB for information that could be retrieved in the job's `FetchLicenceService`. So, in this change we have refactored the job to handle both - determining that a licence has a changed 'end date' - determining what that changed date is As the job has this information, it can then pass it to the downstream services, which means we can delete the redundant code from them. Along the way, we do some housekeeping: updating the job to match the existing jobs, enhancing the comments, and fixing a whoopsie in the query `FetchLicencesServices` uses! 😱 😁
- Loading branch information
1 parent
a16a9ad
commit a236317
Showing
25 changed files
with
864 additions
and
968 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
73 changes: 0 additions & 73 deletions
73
app/services/jobs/import/determine-licence-end-date-changed.service.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
app/services/jobs/import/process-import-licence.service.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.