Open PeterJCLaw opened 6 years ago
@kierdavis thanks! This is definitely in need of some actual testing, as well as a better understanding of some of the errors it's now letting bubble straight away.
I'll update the description to clarify my goals as I think there's an even better way of managing the connections, that we've just not yet found.
This is an attempt to both simplify the logic around the JSON sockets connecting robot-api to robotd and to prepare their usage for having type hints added.
The main unknown I'm facing is not really understanding what real-world scenarios each of the exceptions we currently catch relate to, and thus whether there is anything sensible that we can do in each case.
This branch begins to assume that if we reconnect a socket that we should recommence our instruction cycle with the backend, though doesn't apply this consistently. It's not clear to me how reliable this expectation is; in particular how it affect reconnections which occur in the middle of
_send_and_receive
.Goals
Board
in preparation for types, in particular removing or isolating as much lower-level stuff as possibleOptional
by removingNone
assignments to attributesBoard
class and its connection (this PR won't cover all of this, but I mention this as a related goal)