This commit is contained in:
Mr Chen 2024-05-19 01:32:31 +08:00
parent aac516c8f8
commit 002639936e
4 changed files with 8 additions and 5 deletions

View File

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

View File

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

View File

@ -10,6 +10,8 @@ sysName=`uname`
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
OSNAME=`cat ${rootPath}/data/osname.pl`

View File

@ -38,7 +38,7 @@ function rebuild(){
function rebuildIndex(){
spPost('rebuild', '', function(data){
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 {
layer.msg(data.data,{icon:2,time:2000,shade: [0.3, '#000']});
}