17 lines
188 B
Go
17 lines
188 B
Go
|
|
package app
|
||
|
|
|
||
|
|
import (
|
||
|
|
"time"
|
||
|
|
)
|
||
|
|
|
||
|
|
func (s *Server) StartCleaner() {
|
||
|
|
ticker := time.NewTicker(time.Hour * 1)
|
||
|
|
|
||
|
|
go func() {
|
||
|
|
for {
|
||
|
|
s.Services.Sessions.Cleanup()
|
||
|
|
<-ticker.C
|
||
|
|
}
|
||
|
|
}()
|
||
|
|
}
|