You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/01/13 21:00:13 UTC
git commit: [#7047] add debugging
Updated Branches:
refs/heads/master 9b2f83fcb -> e45ab199a
[#7047] add debugging
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e45ab199
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e45ab199
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e45ab199
Branch: refs/heads/master
Commit: e45ab199a3a3d9a3cd84d4724bd51f5be18ed981
Parents: 9b2f83f
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon Jan 13 20:00:02 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon Jan 13 20:00:02 2014 +0000
----------------------------------------------------------------------
Allura/allura/model/session.py | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e45ab199/Allura/allura/model/session.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/session.py b/Allura/allura/model/session.py
index cdd3500..ff960a2 100644
--- a/Allura/allura/model/session.py
+++ b/Allura/allura/model/session.py
@@ -86,8 +86,22 @@ class ArtifactSessionExtension(SessionExtension):
if objects_deleted:
index_tasks.del_artifacts.post(
[obj.index_id() for obj in objects_deleted])
+ add_task = None
if arefs:
- index_tasks.add_artifacts.post([aref._id for aref in 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')
+ 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:
+ log.info('error running extra debug', exc_info=True)
class BatchIndexer(ArtifactSessionExtension):