diff options
author | drebs <drebs@leap.se> | 2014-02-06 15:46:01 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2014-02-06 16:58:10 -0200 |
commit | 362aaec0897261973e58b4282f5c054985d1f113 (patch) | |
tree | ea059287fdd75432a3b36ad5ef35b61755992215 /src/leap/mail/messageflow.py | |
parent | b887115370795f514c66bdc9c034acd3fb3c4376 (diff) |
Flush IMAP data to disk when stopping. Closes #5095.
Diffstat (limited to 'src/leap/mail/messageflow.py')
-rw-r--r-- | src/leap/mail/messageflow.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/leap/mail/messageflow.py b/src/leap/mail/messageflow.py index b7fc030..80121c8 100644 --- a/src/leap/mail/messageflow.py +++ b/src/leap/mail/messageflow.py @@ -64,6 +64,11 @@ class IMessageProducer(Interface): Stop producing items. """ + def flush(self): + """ + Flush queued messages to consumer. + """ + class DummyMsgConsumer(object): @@ -162,6 +167,12 @@ class MessageProducer(object): if self._loop.running: self._loop.stop() + def flush(self): + """ + Flush queued messages to consumer. + """ + self._check_for_new() + if __name__ == "__main__": from twisted.internet import reactor |