修改了ansible.yml文件shell搅拌
This commit is contained in:
@@ -40,4 +40,4 @@
|
||||
|
||||
- name: shell
|
||||
shell: cd {{ deploy_dir }}/conf && sed -i 's/runmode\s*=\s*.*/runmode = {{ runmode }}/' app.conf && sudo systemctl restart jx-callback-{{ runmode }}
|
||||
when: runmode != "rsm"
|
||||
when: runmode != "print"
|
||||
@@ -1,22 +1,13 @@
|
||||
package testinit1
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/beegodb"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
_, file, _, _ := runtime.Caller(0)
|
||||
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".."+string(filepath.Separator)+".."+string(filepath.Separator))))
|
||||
beego.TestBeegoInit(apppath)
|
||||
|
||||
globals.SugarLogger.Infof("testinit RunMode=%s", beego.BConfig.RunMode)
|
||||
beego.BConfig.RunMode = "dev" // InitBeegoBeforeTest会将runmode设置为test
|
||||
|
||||
globals.Init()
|
||||
beegodb.Init()
|
||||
//_, file, _, _ := runtime.Caller(0)
|
||||
//apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".."+string(filepath.Separator)+".."+string(filepath.Separator))))
|
||||
//beego.TestBeegoInit(apppath)
|
||||
//
|
||||
//globals.SugarLogger.Infof("testinit RunMode=%s", beego.BConfig.RunMode)
|
||||
//beego.BConfig.RunMode = "dev" // InitBeegoBeforeTest会将runmode设置为test
|
||||
//
|
||||
//globals.Init()
|
||||
//beegodb.Init()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user