数据库连接失败终止程序
Signed-off-by: devad <cossjie@foxmail.com> Former-commit-id: 07434ec796bc7330213f9f06fc506840119c215d
This commit is contained in:
parent
879b35b6a6
commit
30398b213f
|
@ -44,7 +44,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
|||
})
|
||||
if err != nil {
|
||||
logx.Error("gorm初始化错误:", err.Error())
|
||||
return nil
|
||||
panic(err)
|
||||
}
|
||||
//添加snowflake支持
|
||||
err = utils.InitSnowflake(c.SnowflakeConf.MachineId)
|
||||
|
|
Loading…
Reference in New Issue