incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [32/50] git commit: [#6545] Remove hint() - no longer needed
Date Tue, 17 Sep 2013 19:57:59 GMT
[#6545] Remove hint() - no longer needed

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


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

Branch: refs/heads/cj/6422
Commit: 657d5101a7f31aba1643c35a36855ecdeae8c2ed
Parents: d6648e1
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Sep 10 15:22:17 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Sep 10 15:22:17 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/discuss.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/657d5101/Allura/allura/model/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index e227b47..03c991e 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -97,13 +97,7 @@ class Discussion(Artifact, ActivityObject):
                 status='ok'
                 ))\
             .sort('timestamp', pymongo.DESCENDING)\
-            .limit(1)\
-            .hint([('discussion_id', pymongo.ASCENDING),
-                   ('status', pymongo.ASCENDING),
-                   ('timestamp', pymongo.ASCENDING),
-                   ])
-            # hint is to try to force the index to be used, since mongo wouldn't select it
sometimes
-            # https://groups.google.com/forum/#!topic/mongodb-user/0TEqPfXxQU8
+            .limit(1)
         return q.first()
 
     def url(self):


Mime
View raw message