disable cleaner auto log
This commit is contained in:
parent
632b27639a
commit
8e6d22ee1d
@ -103,7 +103,7 @@ func (s *Service) CurrentSession(c *gin.Context) *Session {
|
||||
func (s *Service) SessionCleaner() {
|
||||
for range time.Tick(time.Minute) {
|
||||
t := time.Now().UTC().Add(-3 * time.Hour).Truncate(time.Minute)
|
||||
s.LogOk.Printf("Session", "Cleaning old session < %s", t)
|
||||
// s.LogOk.Printf("Session", "Cleaning old session < %s", t)
|
||||
if err := s.DB.Where("updated_at < ?", t).Delete(&Session{}).Error; err != nil {
|
||||
s.LogErr.Printf("Session", "Cleaning failed: %s", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user