You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/11/20 06:19:49 UTC

git commit: [#4452] Add activitystream to ensure_index command

Updated Branches:
  refs/heads/tv/4452 [created] 29f66242f


[#4452] Add activitystream to ensure_index command

Signed-off-by: Tim Van Steenburgh <tv...@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/29f66242
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/29f66242
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/29f66242

Branch: refs/heads/tv/4452
Commit: 29f66242f75e30408e4d276da00ca19e31c82dbd
Parents: fec9d4d
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Wed Nov 20 05:19:34 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Nov 20 05:19:34 2013 +0000

----------------------------------------------------------------------
 Allura/allura/command/show_models.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/29f66242/Allura/allura/command/show_models.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/show_models.py b/Allura/allura/command/show_models.py
index 9872c23..22ca68f 100644
--- a/Allura/allura/command/show_models.py
+++ b/Allura/allura/command/show_models.py
@@ -200,6 +200,7 @@ class EnsureIndexCommand(base.Command):
 
     def command(self):
         from allura import model as M
+        from activitystream.storage.mingstorage import activity_orm_session
         self.basic_setup()
         main_indexes = defaultdict(lambda: defaultdict(list))  # by db, then collection name
         project_indexes = defaultdict(list)  # by collection name
@@ -212,8 +213,8 @@ class EnsureIndexCommand(base.Command):
                 base.log.info('... skipping abstract class %s', cls)
                 continue
             base.log.info('... for class %s', cls)
-            if session(cls) in (
-                M.main_orm_session, M.repository_orm_session, M.task_orm_session):
+            if session(cls) in (M.main_orm_session, M.repository_orm_session,
+                    M.task_orm_session, activity_orm_session):
                 idx = main_indexes[session(cls)][cname]
             else:
                 idx = project_indexes[cname]