incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#6917] Spawn task to handle email routing
Date Fri, 06 Dec 2013 22:31:47 GMT
Updated Branches:
  refs/heads/master 192a5a054 -> 633b107a3


[#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/633b107a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/633b107a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/633b107a

Branch: refs/heads/master
Commit: 633b107a3853e101ef2bd4becf8b31ae35bd3d55
Parents: 192a5a0
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Dec 3 16:34:17 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Dec 6 22:22:59 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/633b107a/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