mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
fix: recover when goroutine panic that will kill main program (#692)
* fix #684 recover when goroutine panic that will kill main program * Update util.go Co-authored-by: Yang Luo <hsluoyz@qq.com>
This commit is contained in:
3
main.go
3
main.go
@ -27,6 +27,7 @@ import (
|
||||
"github.com/casdoor/casdoor/proxy"
|
||||
"github.com/casdoor/casdoor/routers"
|
||||
_ "github.com/casdoor/casdoor/routers"
|
||||
"github.com/casdoor/casdoor/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -40,7 +41,7 @@ func main() {
|
||||
proxy.InitHttpClient()
|
||||
authz.InitAuthz()
|
||||
|
||||
go object.RunSyncUsersJob()
|
||||
util.SafeGoroutine(func() {object.RunSyncUsersJob()})
|
||||
|
||||
//beego.DelStaticPath("/static")
|
||||
beego.SetStaticPath("/static", "web/build/static")
|
||||
|
Reference in New Issue
Block a user