From 994871426d226d675a266acfc06c123668f4f462 Mon Sep 17 00:00:00 2001 From: DarkGopher Date: Mon, 23 Jun 2025 17:53:41 +0200 Subject: [PATCH] before refactor --- storage/files/files.go | 11 ----------- tests/t_test.go | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/storage/files/files.go b/storage/files/files.go index 1e535ff..eb90bda 100644 --- a/storage/files/files.go +++ b/storage/files/files.go @@ -6,7 +6,6 @@ import ( "container/list" "encoding/gob" "fmt" - "log" "os" "path" "sync" @@ -131,15 +130,6 @@ func (pder *ProviderFiles) Exists(sid string) (ex bool) { return } -/*// Exists check if session sid exists in storage -func (pder *ProviderFiles) Exists(sid string) bool { - ckf := ckdirpath(sid) - if _, err := os.Stat(ckf); errors.Is(err, os.ErrExist) { - return false - } - return true -}*/ - // GC periodically remove old sessions rom storages func (pder *ProviderFiles) GC(maxlifetime int64) { pder.lock.Lock() @@ -156,7 +146,6 @@ func (pder *ProviderFiles) GC(maxlifetime int64) { continue } if at.UnixMilli()+(maxlifetime*int64(session.MilisPerSecDuration())) < time.Now().UnixMilli() { - log.Printf("GC remove session: %s atime: %v now: %v", sid, at, time.Now()) pder.li.Remove(ssel) delete(pder.sessions, sid) ckf := ckdirpath(sid) diff --git a/tests/t_test.go b/tests/t_test.go index 9a3c0dc..6096f12 100644 --- a/tests/t_test.go +++ b/tests/t_test.go @@ -304,7 +304,7 @@ func TestRunAll(t *testing.T) { fns := []func(t *testing.T){t1, t2, t3, t4, t5, t6, t7, t8, t9} for idx, fn := range fns { - t.Run(fmt.Sprintf("Test-%d-prv-%s", idx+1, pn), fn) + t.Run(fmt.Sprintf("Test-%d-store-%s", idx+1, pn), fn) } } }