Commit 6565ae3a authored by Leo Pound Singer's avatar Leo Pound Singer

Decrease log verbosity

parent 9efbd4e5
......@@ -40,23 +40,23 @@ class Receiver(EmailBootStep):
username, _, password = netrc().authenticators(self._host)
while self._running:
try:'Starting new connection')
log.debug('Starting new connection')
with IMAPClient(self._host, use_uid=True, timeout=30) as conn:'Logging in')
log.debug('Logging in')
conn.login(username, password)'Selecting inbox')
log.debug('Selecting inbox')
while self._running:'Searching for new messages')
log.debug('Searching for new messages')
messages ='Fetching new messages')
log.debug('Fetching new messages')
for msgid, data in conn.fetch(
messages, ['RFC822']).items():'Sending signal for new email')
log.debug('Sending signal for new email')
email_received.send(None, rfc822=data[b'RFC822'])'Deleting email')
log.debug('Deleting email')
conn.delete_messages(msgid)'Starting idle')
log.debug('Starting idle')
# Stay in IDLE mode for at most 5 minutes.
# According to the imapclient documentation:
......@@ -69,7 +69,7 @@ class Receiver(EmailBootStep):
for _ in range(60):
if not self._running or conn.idle_check(timeout=5):
break'Idle done')
log.debug('Idle done')
except IMAPClientAbortError:
log.exception('IMAP connection aborted')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment