began oauth implementation

This commit is contained in:
0xdcarns
2021-10-21 15:28:58 -04:00
parent 8a54f50676
commit 4e4e8b3ab5
11 changed files with 330 additions and 243 deletions
+2 -2
View File
@@ -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
}