mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-23 00:17:10 +08:00
began oauth implementation
This commit is contained in:
@@ -87,11 +87,11 @@ func getCurrentDB() map[string]interface{} {
|
||||
}
|
||||
|
||||
func InitializeDatabase() error {
|
||||
log.Println("connecting to", servercfg.GetDB())
|
||||
log.Println("[netmaker] connecting to", servercfg.GetDB())
|
||||
tperiod := time.Now().Add(10 * time.Second)
|
||||
for {
|
||||
if err := getCurrentDB()[INIT_DB].(func() error)(); err != nil {
|
||||
log.Println("unable to connect to db, retrying . . .")
|
||||
log.Println("[netmaker] unable to connect to db, retrying . . .")
|
||||
if time.Now().After(tperiod) {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user