-
Notifications
You must be signed in to change notification settings - Fork 7
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
Refactored JobState to have shorter names #2556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
SET_TEMP_STATION_OF_JURISDICTION_FAILED_REMOVE_SPECIAL_ISSUE = 'SET_TEMP_STATION_OF_JURISDICTION_FAILED_REMOVE_SPECIAL_ISSUE' | ||
MOVE_CONTENTIONS_FAILED_REMOVE_SPECIAL_ISSUE = 'MOVE_CONTENTIONS_FAILED_REMOVE_SPECIAL_ISSUE' | ||
MOVE_CONTENTIONS_FAILED_REVERT_TEMP_STATION_OF_JURISDICTION = 'MOVE_CONTENTIONS_FAILED_REVERT_TEMP_STATION_OF_JURISDICTION' | ||
CANCEL_CLAIM_FAILED_REVERT_TEMP_STATION_OF_JURISDICTION = 'CANCEL_CLAIM_FAILED_REVERT_TEMP_STATION_OF_JURISDICTION' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so Java-ish but, then again, DRYing it up won't actually reduce the LoC count.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry can't help myself! 😆
9056674
to
08d9aae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
""" | ||
Uses the name as the automatic value, rather than an integer | ||
|
||
See https://docs.python.org/3/library/enum.html#using-automatic-values for reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cute!
Yeah, this is a neat trick. This URL doesn't have the fragment for me though; https://docs.python.org/3/howto/enum.html#using-automatic-values is the one for me. 🤷
49652c2
to
9cf7642
Compare
* Refactored JobState to have shorter names * Fixed DRY code smell * Fixed url
What was the problem?
JobStates were very long.
How does this fix it?1
JobState names will be shorter, resulting in shorter metric names, log statements, and db entries.
Stacked on PR
How to test this PR
export BIP_CLAIM_URL=mock-bip-claims-api:20300
COMPOSE_PROFILES="bip,bgs" ./gradlew :app:dockerComposeUp
COMPOSE_PROFILES="bip,bgs" ./gradlew -p mocks :dockerComposeUp
./gradlew :domain-ee:ee-ep-merge-app:endToEndTest
Footnotes
Pull-Requests guidelines. If PR is significant, update Current Software State wiki page. ↩