incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#6917] Spawn task to handle email routing
Date Tue, 03 Dec 2013 16:34:36 GMT
Updated Branches:
  refs/heads/tv/6917 [created] 815865d56


[#6917] Spawn task to handle email routing

Because smtp_server is long-running, it's ming session identity map
can get stale. If an app was already in the identity map, the cached
copy of the acl would be used, even if it had been updated in the
meantime. Consequently, updates to the user block list would not
affect email routing unless smtp_server was restarted.

By moving the email routing out-of-process and into a separate task,
we guarantee that each email will be processed within the context of
a fresh session, and therefore, an up-to-date app acl.

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/815865d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/815865d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/815865d5

Branch: refs/heads/tv/6917
Commit: 815865d568940b709967dc5b194a7d24cfe73dd1
Parents: ac565c9
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Dec 3 16:34:17 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Dec 3 16:34:17 2013 +0000

----------------------------------------------------------------------
 Allura/allura/command/smtp_server.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/815865d5/Allura/allura/command/smtp_server.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/smtp_server.py b/Allura/allura/command/smtp_server.py
index cc1710a..ca26cb4 100644
--- a/Allura/allura/command/smtp_server.py
+++ b/Allura/allura/command/smtp_server.py
@@ -50,6 +50,6 @@ class MailServer(smtpd.SMTPServer):
     def process_message(self, peer, mailfrom, rcpttos, data):
         base.log.info('Msg Received from %s for %s', mailfrom, rcpttos)
         base.log.info(' (%d bytes)', len(data))
-        allura.tasks.mail_tasks.route_email(
+        allura.tasks.mail_tasks.route_email.post(
             peer=peer, mailfrom=mailfrom, rcpttos=rcpttos, data=data)
         base.log.info('Msg passed along')


Mime
View raw message