diff --git a/.gitignore b/.gitignore index 21469b15a..e1249f85b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +a.out *.a *.6 *.pyc diff --git a/cmd/rater/kyoto_storage.go b/cmd/rater/kyoto_storage.go index 57ef9906d..7e915ffa5 100644 --- a/cmd/rater/kyoto_storage.go +++ b/cmd/rater/kyoto_storage.go @@ -1,7 +1,8 @@ package main import ( - "github.com/fsouza/gokabinet/kc" + "log" + "github.com/fsouza/gokabinet/kc" ) type KyotoStorage struct { @@ -10,11 +11,13 @@ type KyotoStorage struct { func NewKyotoStorage(filaName string) (*KyotoStorage, error) { ndb, err := kc.Open(filaName, kc.READ) + log.Print("Starting kyoto storage") return &KyotoStorage{db: ndb}, err } func (ks *KyotoStorage) Close() { + log.Print("Closing kyoto storage") ks.db.Close() } diff --git a/cmd/rater/redis_storage.go b/cmd/rater/redis_storage.go index 3f3045773..de1176b9c 100644 --- a/cmd/rater/redis_storage.go +++ b/cmd/rater/redis_storage.go @@ -1,7 +1,8 @@ package main import ( - "github.com/simonz05/godis" + "log" + "github.com/simonz05/godis" ) type RedisStorage struct { @@ -10,11 +11,13 @@ type RedisStorage struct { func NewRedisStorage(address string) (*RedisStorage, error) { ndb:= godis.New(address, 10, "") + log.Print("Starting redis storage") return &RedisStorage{db: ndb}, nil } func (rs *RedisStorage) Close() { + log.Print("Closing redis storage") rs.db.Quit() }