Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6084F10D2C for ; Wed, 22 Jan 2014 20:57:14 +0000 (UTC) Received: (qmail 56346 invoked by uid 500); 22 Jan 2014 20:57:00 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 55992 invoked by uid 500); 22 Jan 2014 20:56:56 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 55957 invoked by uid 99); 22 Jan 2014 20:56:54 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 20:56:54 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 82B628A08A3; Wed, 22 Jan 2014 20:56:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brondsem@apache.org To: allura-commits@incubator.apache.org Date: Wed, 22 Jan 2014 20:57:04 -0000 Message-Id: <8f3189e053e345c6a0c308964be3653d@git.apache.org> In-Reply-To: <94c643a0c4384b3db7d4529eb88a1231@git.apache.org> References: <94c643a0c4384b3db7d4529eb88a1231@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [12/26] git commit: [#7047] further debugging to see if BatchIndexer is in use [#7047] further debugging to see if BatchIndexer is in use Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ffbb4201 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ffbb4201 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ffbb4201 Branch: refs/heads/db/7062 Commit: ffbb4201aa4922335d0bfa3760199cfa22c07c87 Parents: afdf505 Author: Dave Brondsema Authored: Tue Jan 21 14:30:56 2014 -0500 Committer: Dave Brondsema Committed: Tue Jan 21 14:30:56 2014 -0500 ---------------------------------------------------------------------- Allura/allura/model/session.py | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ffbb4201/Allura/allura/model/session.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/session.py b/Allura/allura/model/session.py index f52d164..5354f87 100644 --- a/Allura/allura/model/session.py +++ b/Allura/allura/model/session.py @@ -70,6 +70,22 @@ 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()) @@ -93,15 +109,19 @@ class ArtifactSessionExtension(SessionExtension): 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: 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) class BatchIndexer(ArtifactSessionExtension):