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/08/14 20:56:37 UTC

[07/25] git commit: [#6553] fix taskd error logging (again)

[#6553] fix taskd error logging (again)

* don't re-raise an error after we've logged it already
* commit [2b7892] was incorrect in saying that errormiddleware wasn't used for taskd,
only StatusCodeRedirect was bypassed.  Now we *do* bypass error middleware also


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

Branch: refs/heads/cj/6464
Commit: 9a13632b5524702b4131fa33719c015cb4f2c58f
Parents: fea4b5f
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon Aug 12 19:33:17 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Tue Aug 13 21:15:25 2013 +0000

----------------------------------------------------------------------
 Allura/allura/config/middleware.py | 12 ++++++------
 Allura/allura/model/monq_model.py  |  1 -
 2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9a13632b/Allura/allura/config/middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index bd73dce..1e9b0c7 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -100,7 +100,7 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
 
     # Configure EW variable provider
     ew.render.TemplateEngine.register_variable_provider(get_tg_vars)
-    
+
     # Set FormEncode language to english, as we don't support any other locales
     formencode.api.set_stdtranslation(domain='FormEncode', languages=['en'])
 
@@ -161,16 +161,16 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
     #    streaming=true ensures they won't be cleaned up till
     #    the WSGI application's iterator is exhausted
     app = RegistryManager(app, streaming=True)
-    # Converts exceptions to HTTP errors, shows traceback in debug mode
-    tg.error.footer_html = '<!-- %s %s -->'  # don't use TG footer with extra CSS & images that take time to load
-    app = tg.error.ErrorHandler(app, global_conf, **config['pylons.errorware'])
     # Make sure that the wsgi.scheme is set appropriately when we
     # have the funky HTTP_X_SFINC_SSL  environ var
     if asbool(app_conf.get('auth.method', 'local')=='sfx'):
         app = set_scheme_middleware(app)
-    # Redirect some status codes to /error/document
+    # "task" wsgi would get a 2nd request to /error/document if we used this middleware
     if config.get('override_root') != 'task':
-        # "task" wsgi would get a 2nd request to /error/document if we used this middleware
+        # Converts exceptions to HTTP errors, shows traceback in debug mode
+        tg.error.footer_html = '<!-- %s %s -->'  # don't use TG footer with extra CSS & images that take time to load
+        app = tg.error.ErrorHandler(app, global_conf, **config['pylons.errorware'])
+        # Redirect some status codes to /error/document
         if asbool(config['debug']):
             app = StatusCodeRedirect(app, base_config.handle_status_codes)
         else:

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9a13632b/Allura/allura/model/monq_model.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/monq_model.py b/Allura/allura/model/monq_model.py
index 9fa0064..3163ea5 100644
--- a/Allura/allura/model/monq_model.py
+++ b/Allura/allura/model/monq_model.py
@@ -264,7 +264,6 @@ class MonQTask(MappedClass):
                 log.error(self.result)
             else:
                 self.result = traceback.format_exc()
-            raise
         finally:
             self.time_stop = datetime.utcnow()
             session(self).flush(self)