allura
Revision | 271fdc4e35465af72f761bd513e260e07f0b2328 (tree) |
---|---|
Time | 2012-06-22 06:04:24 |
Author | Cory Johns <johnsca@geek...> |
Commiter | Cory Johns |
[#4391] Added migration to install activity tool
Signed-off-by: Cory Johns <johnsca@geek.net>
@@ -18,6 +18,7 @@ log = logging.getLogger(__name__) | ||
18 | 18 | class ForgeActivityApp(Application): |
19 | 19 | """Project Activity page for projects.""" |
20 | 20 | __version__ = version.__version__ |
21 | + default_mount_point = 'activity' | |
21 | 22 | installable = False |
22 | 23 | searchable = False |
23 | 24 | hidden = True |
@@ -0,0 +1,19 @@ | ||
1 | +import logging | |
2 | + | |
3 | +from ming.orm import ThreadLocalORMSession | |
4 | + | |
5 | +from allura.lib import utils | |
6 | +from allura import model as M | |
7 | + | |
8 | +log = logging.getLogger(__name__) | |
9 | + | |
10 | +def main(): | |
11 | + for chunk in utils.chunked_find(M.Project): | |
12 | + for p in chunk: | |
13 | + p.install_app('activity') | |
14 | + | |
15 | + ThreadLocalORMSession.flush_all() | |
16 | + ThreadLocalORMSession.close_all() | |
17 | + | |
18 | +if __name__ == '__main__': | |
19 | + main() |