def update_index():
require('srvr', 'path', 'within_virtualenv', provided_by=env.servers)
with cd(env.path), prefix(env.within_virtualenv):
run('./manage.py build_solr_schema > schema.xml')
run('mv schema.xml ../../solr/collection1/conf/')
sudo('service tomcat7-{} restart'.format(env.srvr))
run('./manage.py update_index')
评论列表
文章目录