open-autonomy / spot

MIT License
6 stars 1 forks source link

No need to have PendingClose place state #4

Closed avahan closed 1 year ago

avahan commented 1 year ago

While implementing LastMileDispatching and state machine it became clear, that there is no need in separate state for place as PendingClose. In any case there will be two states to analyze: For Spot: PlaceState + SpotState For Queue: PlaceState + QueueState

So everyone receiving those will be able to determine on their own, that place is pending close, if PlaceState is Closed, but there is still some activity (i.e. Full or Reserved). There is no need in explicit state to indicate that.

politick commented 1 year ago

Yes you're right. This is an artefact from when the spot state and user control states were in a single state machine.

As far as the user, it's either open, closed or deleted. The Pending delete is meaningful for the user, but as you've stated pending close is redundant in this state machine.