You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/12/16 18:09:45 UTC

[06/36] git commit: [#6917] Spawn task to handle email routing

[#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 <tv...@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/cj/6821
Commit: 633b107a3853e101ef2bd4becf8b31ae35bd3d55
Parents: 192a5a0
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Dec 3 16:34:17 2013 +0000
Committer: Dave Brondsema <db...@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')