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 := mgo.Index{}
|
||||||
indexTimeUTC.Key = []string{`TimeUTC`}
|
indexTimeUTC.Key = []string{`TimeUTC`}
|
||||||
logDBCollection.EnsureIndex(indexTimeUTC)
|
|
||||||
|
|
||||||
if expire {
|
if expire {
|
||||||
indexTTL := mgo.Index{}
|
indexTimeUTC.ExpireAfter = time.Duration(expireAfterDays*24) * time.Hour
|
||||||
indexTTL.Key = []string{`TimeUTC`}
|
} else {
|
||||||
indexTTL.ExpireAfter = time.Duration(expireAfterDays) * time.Hour * 24
|
indexTimeUTC.ExpireAfter = time.Duration(0)
|
||||||
logDBCollection.EnsureIndex(indexTTL)
|
|
||||||
}
|
}
|
||||||
|
logDBCollection.EnsureIndex(indexTimeUTC)
|
||||||
|
|
||||||
indexProject := mgo.Index{}
|
indexProject := mgo.Index{}
|
||||||
indexProject.Key = []string{`Project`}
|
indexProject.Key = []string{`Project`}
|
||||||
|
@ -11,7 +11,6 @@ func Start() {
|
|||||||
|
|
||||||
// Tell the whole cluster, that we are up and ready:
|
// Tell the whole cluster, that we are up and ready:
|
||||||
data := SystemMessages.ICCCStartUpMessage{}
|
data := SystemMessages.ICCCStartUpMessage{}
|
||||||
defer ICCC.WriteMessage2All(ICCC.ChannelSYSTEM, `System::Start`, data)
|
|
||||||
|
|
||||||
if serverPublic != nil {
|
if serverPublic != nil {
|
||||||
data.PublicIPAddressAndPort = serverPublicAddressPort
|
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)
|
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameSTARTUP, `Admin web server is now listening.`, `Configuration for hostname and port.`, serverAdminAddressPort)
|
||||||
go serverAdmin.ListenAndServe()
|
go serverAdmin.ListenAndServe()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ICCC.WriteMessage2All(ICCC.ChannelSYSTEM, `System::Start`, data)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user