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 2014/02/03 23:53:28 UTC

[02/15] git commit: [#7079] revert debug logging

[#7079] revert debug logging


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

Branch: refs/heads/cj/7085
Commit: 49d4ea8b2e97dea1490a609055614fd15ee6ac95
Parents: a2d2627
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Jan 24 22:29:21 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri Jan 24 22:29:21 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/session.py | 42 +------------------------------------
 1 file changed, 1 insertion(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/49d4ea8b/Allura/allura/model/session.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/session.py b/Allura/allura/model/session.py
index 77f8645..68c8099 100644
--- a/Allura/allura/model/session.py
+++ b/Allura/allura/model/session.py
@@ -70,24 +70,6 @@ class ArtifactSessionExtension(SessionExtension):
             except Exception:
                 log.exception(
                     "Failed to update artifact references. Is this a borked project migration?")
-            try:
-                l = logging.getLogger('allura.debug7047')
-                from tg import request
-                task = request.environ.get('task')
-            except:
-                pass
-            else:
-                try:
-                    if task and task.task_name == 'forgetracker.tasks.bulk_edit':
-                        l.debug('this extension: %s', type(self))
-                        l.debug('active session extensions are: %s',
-                                artifact_orm_session._kwargs.get('extensions'))
-                        l.debug('threadlocal session is for: %s',
-                                [s.impl.db for s in artifact_orm_session._session_registry.values()])
-                        l.debug('current session is: %s', self.session.impl.db)
-                except Exception:
-                    log.info('error running extra debug pt1', exc_info=True)
-
             self.update_index(self.objects_deleted, arefs)
             for obj in self.objects_added:
                 g.zarkov_event('create', extra=obj.index_id())
@@ -104,30 +86,8 @@ class ArtifactSessionExtension(SessionExtension):
         if objects_deleted:
             index_tasks.del_artifacts.post(
                 [obj.index_id() for obj in objects_deleted])
-        add_task = None
         if arefs:
-            add_task = index_tasks.add_artifacts.post(
-                [aref._id for aref in arefs])
-        try:
-            l = logging.getLogger('allura.debug7047')
-            from tg import request
-            task = request.environ.get('task')
-        except:
-            pass
-        else:
-            try:
-                if task and task.task_name == 'forgetracker.tasks.bulk_edit':
-                    #l.debug('session: %s %s', self.session.impl.db, self.session)
-                    l.debug('arefs: %s', arefs)
-                    l.debug('objects_added: %s',
-                            [o._id for o in self.objects_added])
-                    l.debug('objects_modified: %s',
-                            [o._id for o in self.objects_modified])
-                    l.debug('objects_deleted: %s',
-                            [o._id for o in self.objects_deleted])
-                    l.debug('add_artifacts task: %s', add_task)
-            except Exception:
-                log.info('error running extra debug pt2', exc_info=True)
+            index_tasks.add_artifacts.post([aref._id for aref in arefs])
 
 
 class BatchIndexer(ArtifactSessionExtension):