Fix: Actually running the memory profile storage every 24hrs
This commit is contained in:
parent
8b33722b1c
commit
cf790e88ff
7
main.go
7
main.go
|
@ -81,6 +81,11 @@ func main() {
|
|||
|
||||
go CloseSatelOnCtrlC(s, &cleanShutdown)
|
||||
|
||||
closeDebugTools := make(chan interface{})
|
||||
if config.WriteMemoryProfile {
|
||||
WriteMemoryProfilePeriodically(&wg, log.New(os.Stderr, "DebugTools", log.Lmicroseconds), closeDebugTools)
|
||||
}
|
||||
|
||||
for e := range FilterByTypeOrIndex(
|
||||
FilterByLastSeen(s.Events, &wg, &dataStore, log.New(os.Stderr, "FilterByLastSeen", log.Lmicroseconds)),
|
||||
&wg, config.AllowedTypes, config.AllowedIndexes) {
|
||||
|
@ -88,8 +93,6 @@ func main() {
|
|||
tgEvents <- GenericMessage{e.BasicEvents}
|
||||
}
|
||||
|
||||
closeDebugTools := make(chan interface{})
|
||||
WriteMemoryProfilePeriodically(&wg, log.New(os.Stderr, "DebugTools", log.Lmicroseconds), closeDebugTools)
|
||||
logger.Print("Closing...")
|
||||
close(closeDebugTools)
|
||||
close(tgEvents)
|
||||
|
|
Loading…
Reference in New Issue