Logging expire & Bugfix
**** Not done yet **** + Bugfix: The data of the startup ICCC message was not proper set + Changed the logging expire
This commit is contained in:
parent
e28999e15f
commit
9189f92432
@ -58,14 +58,12 @@ func initDatabase() {
|
||||
//
|
||||
indexTimeUTC := mgo.Index{}
|
||||
indexTimeUTC.Key = []string{`TimeUTC`}
|
||||
logDBCollection.EnsureIndex(indexTimeUTC)
|
||||
|
||||
if expire {
|
||||
indexTTL := mgo.Index{}
|
||||
indexTTL.Key = []string{`TimeUTC`}
|
||||
indexTTL.ExpireAfter = time.Duration(expireAfterDays) * time.Hour * 24
|
||||
logDBCollection.EnsureIndex(indexTTL)
|
||||
indexTimeUTC.ExpireAfter = time.Duration(expireAfterDays*24) * time.Hour
|
||||
} else {
|
||||
indexTimeUTC.ExpireAfter = time.Duration(0)
|
||||
}
|
||||
logDBCollection.EnsureIndex(indexTimeUTC)
|
||||
|
||||
indexProject := mgo.Index{}
|
||||
indexProject.Key = []string{`Project`}
|
||||
|
@ -11,7 +11,6 @@ func Start() {
|
||||
|
||||
// Tell the whole cluster, that we are up and ready:
|
||||
data := SystemMessages.ICCCStartUpMessage{}
|
||||
defer ICCC.WriteMessage2All(ICCC.ChannelSYSTEM, `System::Start`, data)
|
||||
|
||||
if serverPublic != nil {
|
||||
data.PublicIPAddressAndPort = serverPublicAddressPort
|
||||
@ -24,4 +23,6 @@ func Start() {
|
||||
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameSTARTUP, `Admin web server is now listening.`, `Configuration for hostname and port.`, serverAdminAddressPort)
|
||||
go serverAdmin.ListenAndServe()
|
||||
}
|
||||
|
||||
ICCC.WriteMessage2All(ICCC.ChannelSYSTEM, `System::Start`, data)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user