summaryrefslogtreecommitdiff
path: root/mail/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-08-21 18:55:50 +0200
committerKali Kaneko <kali@leap.se>2013-08-21 20:30:28 +0200
commitca46433db3bf4f80fc98707e47170911ea20cdbd (patch)
tree1322528969ce8d58608ae9aa398cda0830323e2c /mail/src
parent62b298065e51e85a06908e98870c361821c51e88 (diff)
Make a sensible default for incoming mail fetch period.
Setting it to 5 min.
Diffstat (limited to 'mail/src')
-rw-r--r--mail/src/leap/mail/imap/fetch.py3
-rw-r--r--mail/src/leap/mail/imap/service/imap.py6
2 files changed, 3 insertions, 6 deletions
diff --git a/mail/src/leap/mail/imap/fetch.py b/mail/src/leap/mail/imap/fetch.py
index 3b15c6a1..592e4e32 100644
--- a/mail/src/leap/mail/imap/fetch.py
+++ b/mail/src/leap/mail/imap/fetch.py
@@ -104,7 +104,6 @@ class LeapIncomingMail(object):
Calls a deferred that will execute the fetch callback
in a separate thread
"""
- logger.debug('fetching mail...')
d = deferToThread(self._sync_soledad)
d.addCallbacks(self._process_doclist, self._sync_soledad_err)
return d
@@ -125,7 +124,6 @@ class LeapIncomingMail(object):
def _sync_soledad(self):
log.msg('syncing soledad...')
- logger.debug('in soledad sync')
try:
self._soledad.sync()
@@ -212,6 +210,7 @@ class LeapIncomingMail(object):
return False
logger.debug('got incoming message: %s' % (rawmsg,))
+ # XXX factor out gpg bits.
try:
pgp_beg = "-----BEGIN PGP MESSAGE-----"
pgp_end = "-----END PGP MESSAGE-----"
diff --git a/mail/src/leap/mail/imap/service/imap.py b/mail/src/leap/mail/imap/service/imap.py
index 6b2a61da..94c2c642 100644
--- a/mail/src/leap/mail/imap/service/imap.py
+++ b/mail/src/leap/mail/imap/service/imap.py
@@ -34,14 +34,12 @@ from leap.mail.imap.server import SoledadBackedAccount
from leap.mail.imap.fetch import LeapIncomingMail
from leap.soledad import Soledad
-IMAP_PORT = 1984
# The default port in which imap service will run
+IMAP_PORT = 1984
-# TODO: Make this configurable
-INCOMING_CHECK_PERIOD = 5
-#INCOMING_CHECK_PERIOD = 60
# The period between succesive checks of the incoming mail
# queue (in seconds)
+INCOMING_CHECK_PERIOD = 300
from leap.common.events.events_pb2 import IMAP_SERVICE_STARTED
from leap.common.events.events_pb2 import IMAP_SERVICE_FAILED_TO_START