Code review comment for lp:~facundo/ubuntuone-client/states-refactor

Revision history for this message
Facundo Batista (facundo) wrote :

Big States refactor.

This is the new States, the machine the makes the big transitions in
SyncDaemon.

Previously, we had the manager in state.py, and a big collection of
states in states.py.

Now we have only one states.py, that is much much simpler. The
responsibilities are split in three:

- StateManager: big states

- QueueManager: handles which AQ queue to execute.

- ConnectionManager: hanldes the network status.

You can check graphs for all three in the 'docs' directory.

Also, some other changes are in this branch:

- a couple of events renaming, to make it more clear, and removed some
  unused events.

- LocalRescan is another step in the big states, not something semi-handled
  by main.py.

- Lot of docstring fixes

- No more max handshake timeouts, so that option is removed everywhere

- RequestQueue behaviour about what is WAITING and what is DONE.

Of course, previous tests are adapted to these changes.

Finally, included an extensive test suite for this.

« Back to merge proposal