pull/577/head
Mr Chen 12 months ago
parent aac516c8f8
commit 002639936e
  1. 7
      plugins/sphinx/index.py
  2. 2
      plugins/sphinx/init.d/sphinx.tpl
  3. 2
      plugins/sphinx/install.sh
  4. 2
      plugins/sphinx/js/sphinx.js

@ -210,9 +210,10 @@ def reload():
def rebuild(): def rebuild():
file = initDreplace() file = initDreplace()
subprocess.Popen(file + ' rebuild &', cmd = file + ' rebuild &'
stdout=subprocess.PIPE, shell=True) data = mw.execShell(cmd)
# data = mw.execShell(file + ' rebuild') if data[1] != '':
return data[0]
return 'ok' return 'ok'

@ -33,7 +33,7 @@ start () {
} }
rebuild () { rebuild () {
${APP_PATH}/bin/bin/indexer -c ${APP_CONF} --all --rotate & ${APP_PATH}/bin/bin/indexer -c ${APP_CONF} --all --rotate
} }

@ -10,6 +10,8 @@ sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl install_tmp=${rootPath}/tmp/mw_install.pl
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/sphinx/index.py rebuild
bash ${rootPath}/scripts/getos.sh bash ${rootPath}/scripts/getos.sh
OSNAME=`cat ${rootPath}/data/osname.pl` OSNAME=`cat ${rootPath}/data/osname.pl`

@ -38,7 +38,7 @@ function rebuild(){
function rebuildIndex(){ function rebuildIndex(){
spPost('rebuild', '', function(data){ spPost('rebuild', '', function(data){
if (data.data == 'ok'){ if (data.data == 'ok'){
layer.msg('在重建中..',{icon:1,time:2000,shade: [0.3, '#000']}); layer.msg('重建成功!',{icon:1,time:2000,shade: [0.3, '#000']});
} else { } else {
layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']}); layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']});
} }

Loading…
Cancel
Save