Child: [ddf08c] (diff)

Download this file

026-install-activity-tool.py    20 lines (13 with data), 401 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import logging
from ming.orm import ThreadLocalORMSession
from allura.lib import utils
from allura import model as M
log = logging.getLogger(__name__)
def main():
for chunk in utils.chunked_find(M.Project):
for p in chunk:
p.install_app('activity')
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
if __name__ == '__main__':
main()