incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#5046] Reduced calls to _all_runs() to limit slow query
Date Wed, 03 Oct 2012 21:11:22 GMT
Updated Branches:
  refs/heads/master 78ab60f9a -> a67afef94


[#5046] Reduced calls to _all_runs() to limit slow query

Signed-off-by: Cory Johns <johnsca@geek.net>


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

Branch: refs/heads/master
Commit: a67afef94792e2cfafd2e60ec02be46b1f93c440
Parents: 78ab60f
Author: Cory Johns <johnsca@geek.net>
Authored: Wed Oct 3 19:01:27 2012 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Wed Oct 3 21:10:26 2012 +0000

----------------------------------------------------------------------
 Allura/allura/model/repo_refresh.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a67afef9/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index 4f62214..4b8c1af 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -222,8 +222,9 @@ class CommitRunBuilder(object):
             run['commit_times'] += parent_run['commit_times']
             run['parent_commit_ids'] = parent_run['parent_commit_ids']
             run.m.save()
-            runs[p_cis[0]].m.delete()
-        for run1 in self._all_runs():
+            parent_run.m.delete()
+            del runs[p_cis[0]]
+        for run1 in runs.values():
             # if run1 is a subset of another run, delete it
             if CommitRunDoc.m.find(dict(commit_ids={'$all': run1.commit_ids},
                     _id={'$ne': run1._id})).count():


Mime
View raw message