-
Notifications
You must be signed in to change notification settings - Fork 25
Add state and description codes: Part 1 #300
Conversation
This adds the functionallity to add, remove or get top elements from a Redis sorted set.
73e6c6c to
c900e6a
Compare
Stadicus
left a comment
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.
Concept ACK, untested and no code review
c900e6a to
149780d
Compare
|
fix typo |
Tomasvrba
left a comment
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.
Light code review, I need caffeine XD
This changes the supervisor to use the Redis HTTP query interface inmplementation from the middleware.
This adds the definitions for: - a map defining the priority of a descriptionCode - a map defining the stateCode of a descriptionCode - a couple of LogTags the middleware logs, which are read by the supervisor
This adds a Redis string for the Base stateCode and a Redis sorted set for the descriptionCode.
149780d to
71c173f
Compare
|
Thanks @Tomasvrba! Addressed. |
Tomasvrba
left a comment
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.
ACK with two small comments:
- When reviewing sequentially commit by commit, it's helpful when the commit message says
whythe commit does something, not what it does. For the first commit:
add: Redis sorted-set add, remove, gettop element
This adds the functionallity to add, remove or get top elements from a
Redis sorted set.
I can see from the code that it adds the functionallity to add, remove or get top elements from a Redis sorted set, but without looking at the rest of the commits in the PR first, it would be good to know why this is needed.
- Another
why, what's the logic behind theMapDescriptionCodePrioritynumbers?
|
Thank you Tom! For context: I thought about answering your questions here, but I guess it makes more sense to link to the complete documentation in the second PR #305 |
This PR adds the foundation and groundwork for the state and description codes. The handling by the Supervisor and the Middleware will come in part 2.
I leave this as a draft until BitBoxSwiss/bitbox02-api-go#17 is merged