summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-22 11:27:44 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-22 11:27:44 -0300
commitcf2afc254f7c6f8ac67b83c417b17ca4891a6059 (patch)
tree9bbf4a298f75fd7fd263d0bcd4792e622a1c7950
parenteffb83d02d0f5f792dfab10178de72b0e655dd64 (diff)
parentca46433db3bf4f80fc98707e47170911ea20cdbd (diff)
Merge remote-tracking branch 'kali/feature/3409_make_imap_fetch_period_configurable' into develop
-rw-r--r--mail/changes/feature_3409-imap-fetch-period2
-rw-r--r--mail/src/leap/mail/imap/fetch.py3
-rw-r--r--mail/src/leap/mail/imap/service/imap.py6
3 files changed, 5 insertions, 6 deletions
diff --git a/mail/changes/feature_3409-imap-fetch-period b/mail/changes/feature_3409-imap-fetch-period
new file mode 100644
index 0000000..a6e2dd2
--- /dev/null
+++ b/mail/changes/feature_3409-imap-fetch-period
@@ -0,0 +1,2 @@
+ o Make default imap fetch period 5 minutes. Client can config it
+ via environment variable for debug. Closes: #3409
diff --git a/mail/src/leap/mail/imap/fetch.py b/mail/src/leap/mail/imap/fetch.py
index 802ce26..2b25d82 100644
--- a/mail/src/leap/mail/imap/fetch.py
+++ b/mail/src/leap/mail/imap/fetch.py
@@ -102,7 +102,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
@@ -123,7 +122,6 @@ class LeapIncomingMail(object):
def _sync_soledad(self):
log.msg('syncing soledad...')
- logger.debug('in soledad sync')
try:
self._soledad.sync()
@@ -210,6 +208,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 b4776f2..9e9a524 100644
--- a/mail/src/leap/mail/imap/service/imap.py
+++ b/mail/src/leap/mail/imap/service/imap.py
@@ -35,14 +35,12 @@ from leap.mail.imap.server import SoledadBackedAccount
from leap.mail.imap.fetch import LeapIncomingMail
from leap.soledad.client 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