summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-02-12 13:05:08 -0400
committerKali Kaneko <kali@leap.se>2014-02-17 11:39:50 -0400
commit3d2fd0a2ecf1efe19f6b171740d8604d8fb2ec0d (patch)
treef992912d858b65f81de6037df7b83e986c4499fd
parenta778c1249dca9067a7a5b748e00147a0a0be11f4 (diff)
docstring fixes
-rw-r--r--mail/src/leap/mail/imap/messages.py3
-rw-r--r--mail/src/leap/mail/imap/soledadstore.py19
2 files changed, 11 insertions, 11 deletions
diff --git a/mail/src/leap/mail/imap/messages.py b/mail/src/leap/mail/imap/messages.py
index 0aa40f19..a49ea908 100644
--- a/mail/src/leap/mail/imap/messages.py
+++ b/mail/src/leap/mail/imap/messages.py
@@ -245,8 +245,6 @@ class LeapMessage(fields, MailParser, MBoxParser):
:type mode: int
"""
leap_assert(isinstance(flags, tuple), "flags need to be a tuple")
- #log.msg('setting flags: %s (%s)' % (self._uid, flags))
-
mbox, uid = self._mbox, self._uid
APPEND = 1
@@ -325,7 +323,6 @@ class LeapMessage(fields, MailParser, MBoxParser):
body = bdoc_content.get(self.RAW_KEY, "")
content_type = bdoc_content.get('content-type', "")
charset = find_charset(content_type)
- #logger.debug('got charset from content-type: %s' % charset)
if charset is None:
charset = self._get_charset(body)
try:
diff --git a/mail/src/leap/mail/imap/soledadstore.py b/mail/src/leap/mail/imap/soledadstore.py
index f4158944..6d6d3821 100644
--- a/mail/src/leap/mail/imap/soledadstore.py
+++ b/mail/src/leap/mail/imap/soledadstore.py
@@ -41,9 +41,7 @@ logger = logging.getLogger(__name__)
# TODO
-# [ ] Delete original message from the incoming queue after all successful
-# writes.
-# [ ] Implement a retry queue.
+# [ ] Implement a retry queue?
# [ ] Consider journaling of operations.
@@ -231,9 +229,9 @@ class SoledadStore(ContentDedup):
"""
Creates a new document in soledad db.
- :param queue: queue to get item from, with content of the document
- to be inserted.
- :type queue: Queue
+ :param queue: a tuple of queues to get item from, with content of the
+ document to be inserted.
+ :type queue: tuple of Queues
"""
new, dirty = queue
while not new.empty():
@@ -266,9 +264,14 @@ class SoledadStore(ContentDedup):
def _consume_doc(self, doc_wrapper, notify_queue):
"""
Consume each document wrapper in a separate thread.
+ We pass an instance of an accumulator that handles the notifications
+ to the memorystore when the write has been done.
:param doc_wrapper: a MessageWrapper or RecentFlagsDoc instance
:type doc_wrapper: MessageWrapper or RecentFlagsDoc
+ :param notify_queue: a callable that handles the writeback
+ notifications to the memstore.
+ :type notify_queue: callable
"""
def queueNotifyBack(failed, doc_wrapper):
if failed:
@@ -316,8 +319,8 @@ class SoledadStore(ContentDedup):
followed by the subparts item and the proper call type for every
item in the queue, if any.
- :param queue: the queue from where we'll pick item.
- :type queue: Queue
+ :param doc_wrapper: a MessageWrapper or RecentFlagsDoc instance
+ :type doc_wrapper: MessageWrapper or RecentFlagsDoc
"""
if isinstance(doc_wrapper, MessageWrapper):
return chain((doc_wrapper,),