leapcode/leap_mail — pull request #106 by kalikaneko (2014-01-15 21:37:57+00:00)
Title: Bug/bug 4963 fix bulky fetch

* Move locks to soledad client. https://github.com/leapcode/soledad/pull/118
Since the soledad client lock gets us covered with writes now, it makes
no sense to enqueue using the messageconsumer.
The SoledadWriter is left orphaned by now. We might want to reuse it
to enqueue low priority tasks that need a strategy of retries in case
of revisionconflicts.
the MessageConsumer abstraction should also be useful for the case of
the smtp queue.

* Compute the intersection set of the uids on a FETCH, so we avoid
iterating through the non-existant UIDs.
* Dispatch FLAGS query to our specialized method, that fetches all the
flags documents and return objects that only specify one subset of the
MessagePart interface, apt to render flags quickly with less queries
overhead.
* Overwrite the do_FETCH command in the imap Server to use fetch_flags.
* Use deferLater for a better dispatch of tasks in the reactor.

* Update service initialization file. This will need to place a configuration file with:
* userid
* uuid
* password (optional)