Closed justinvdm closed 8 years ago
Ready for review.
I'd be happier if these were named constants, so it's harder to accidentally misspell them or something.
@jerith Doesn't message validation already check that?
Ah, I didn't see that. Thanks. :-)
I still think it makes more sense to use something more "enumeration-like" than arbitrary strings given that there is a fixed set of valid values, but I'm also okay with strings+validation.
@hodgestar Hmm, forgot that we do validation, good point.
Changed to using class-level variables, but happy to revert the change.
I'm okay with keeping the constants. They're sometimes a little annoying in Python because one ends up importing weird modules and classes just to access one string, but in Vumi itself that's not really an issue.
And we have validation too, so woot.
Other than the final tiny comment about a missed opportunity to used TransportStatus.STATUS_X
, looks good to me.
Decided to revert the class-level variables approach, agree with this comment.
Ready for re-review.
:+1:
At the moment we use
good
,minor
andmajor
. The plan is to change these took
,degraded
anddown
, since those are better descriptions for what the status events mean.