diff options
Diffstat (limited to 'service/pixelated/adapter')
-rw-r--r-- | service/pixelated/adapter/soledad/soledad_facade_mixin.py | 3 | ||||
-rw-r--r-- | service/pixelated/adapter/soledad/soledad_writer_mixin.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/service/pixelated/adapter/soledad/soledad_facade_mixin.py b/service/pixelated/adapter/soledad/soledad_facade_mixin.py index e5dbb458..d3baa64b 100644 --- a/service/pixelated/adapter/soledad/soledad_facade_mixin.py +++ b/service/pixelated/adapter/soledad/soledad_facade_mixin.py @@ -57,9 +57,10 @@ class SoledadDbFacadeMixin(object): def create_doc(self, doc): return self.soledad.create_doc(doc) + @defer.inlineCallbacks def create_docs(self, docs): for doc in docs: - self.create_doc(doc) + yield self.create_doc(doc) def delete_doc(self, doc): return self.soledad.delete_doc(doc) diff --git a/service/pixelated/adapter/soledad/soledad_writer_mixin.py b/service/pixelated/adapter/soledad/soledad_writer_mixin.py index 262351cb..43e5d323 100644 --- a/service/pixelated/adapter/soledad/soledad_writer_mixin.py +++ b/service/pixelated/adapter/soledad/soledad_writer_mixin.py @@ -38,7 +38,7 @@ class SoledadWriterMixin(SoledadDbFacadeMixin, object): mbox_doc = (yield self.get_mbox(mailbox_name))[0] uid = 1 + (yield self.get_lastuid(mbox_doc)) - self.create_docs(mail.get_for_save(next_uid=uid, mailbox=mailbox_name)) + yield self.create_docs(mail.get_for_save(next_uid=uid, mailbox=mailbox_name)) # FIXME need to update meta message (mdoc) # mbox_doc.content['lastuid'] = uid + 1 |