Version 2.0.7
This commit is contained in:
1 parent
0c80f4bdcc
commit
b2cf41a088
5 files changed
+49
-48
No files matched your search
@@ -14,7 +14,7 @@ func connectDatabase(config Meta.Configuration) {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
fmt.Printf("[Error] Was not able to connect to the configuration database: %s. Please read https://github.com/SommerEngineering/Ocean.\n", err)
|
||||
os.Exit(0)
|
||||
os.Exit(1)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -22,7 +22,7 @@ func connectDatabase(config Meta.Configuration) {
|
||||
if newSession, errDial := mgo.Dial(config.ConfigDBHostname); errDial != nil {
|
||||
Log.LogFull(senderName, LM.CategorySYSTEM, LM.LevelERROR, LM.SeverityUnknown, LM.ImpactUnknown, LM.MessageNameDATABASE, `It was not possible to connect to the MongoDB host `+config.ConfigDBHostname, errDial.Error())
|
||||
fmt.Printf("[Error] Was not able to connect to the configuration database: %s. Please read https://github.com/SommerEngineering/Ocean.\n", errDial.Error())
|
||||
os.Exit(0)
|
||||
os.Exit(1)
|
||||
} else {
|
||||
session = newSession
|
||||
}
|
||||
@@ -34,7 +34,7 @@ func connectDatabase(config Meta.Configuration) {
|
||||
if errLogin := db.Login(config.ConfigDBConfigurationCollectionUsername, config.ConfigDBConfigurationCollectionPassword); errLogin != nil {
|
||||
Log.LogFull(senderName, LM.CategorySYSTEM, LM.LevelSECURITY, LM.SeverityUnknown, LM.ImpactUnknown, LM.MessageNameDATABASE, `It was not possible to login the user `+config.ConfigDBConfigurationCollectionUsername, errLogin.Error())
|
||||
fmt.Printf("[Error] Was not able to connect to the configuration database: %s. Please read https://github.com/SommerEngineering/Ocean.\n", errLogin.Error())
|
||||
os.Exit(0)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// In case of write operations, wait for the majority of servers to be done:
|
||||
|
||||
Reference in new issue
Block a user