robosats
robosats copied to clipboard
Refactor Order/Slot models
What does this PR do?
Changes on this PR:
- Clear differentiation between
CurrentOrder(visited order on the order page) andActiveOrder/LastOrder(orders associated to the slot) - Creation of the Order class. Any interaction with an order now happens through it.
- Creation of the Robot class. Any interaction with a robot now happens through it.
- Garage now is fully responsible of Orders and Robots.
- Fixes the iterative code to check and notify about an active order
- Federation and Garage Contexts now are fully decoupled and independent
- Several bugs related to orders fixed. Probably some new introduced :)
- A lot of simplification of code
- Remove all different
...UpdatedAtvariables and keep onlyslotUpdatedAtandfederationUpdatedAt
Checklist before merging
- [x] Install pre-commit and initialize it:
pip install pre-commit, thenpre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.