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 75474EF68 for ; Tue, 22 Jan 2013 23:23:19 +0000 (UTC) Received: (qmail 42749 invoked by uid 500); 22 Jan 2013 23:23:19 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 42661 invoked by uid 500); 22 Jan 2013 23:23:19 -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 41951 invoked by uid 99); 22 Jan 2013 23:23:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2013 23:23:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4D38F822FB7; Tue, 22 Jan 2013 23:23:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [24/50] git commit: [#4691] Flush after computing LCD for each commit Message-Id: <20130122232318.4D38F822FB7@tyr.zones.apache.org> Date: Tue, 22 Jan 2013 23:23:18 +0000 (UTC) [#4691] Flush after computing LCD for each commit Signed-off-by: Cory Johns Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a3d2e05f Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a3d2e05f Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a3d2e05f Branch: refs/heads/cj/4691 Commit: a3d2e05ffd21c4317b23e4b5c805f04ae689e7cc Parents: 870f00f Author: Cory Johns Authored: Fri Dec 7 17:27:52 2012 +0000 Committer: Cory Johns Committed: Tue Jan 22 23:22:43 2013 +0000 ---------------------------------------------------------------------- Allura/allura/model/repo_refresh.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a3d2e05f/Allura/allura/model/repo_refresh.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py index ea0154b..36ca927 100644 --- a/Allura/allura/model/repo_refresh.py +++ b/Allura/allura/model/repo_refresh.py @@ -11,7 +11,7 @@ import tg from pylons import g,c from ming.base import Object -from ming.orm import mapper, session +from ming.orm import mapper, session, ThreadLocalORMSession from allura.lib import utils from allura.lib import helpers as h @@ -104,6 +104,7 @@ def refresh_repo(repo, all_commits=False, notify=True): for i, oid in enumerate(reversed(commit_ids)): ci = cache.get(Commit, dict(_id=oid)) compute_lcds(ci, cache) + ThreadLocalORMSession.flush_all() if (i+1) % 100 == 0: log.info('Compute last commit info %d: %s', (i+1), ci._id)