1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-24 05:17:03 +00:00

Session database for file-storage https://github.com/kataras/iris/issues/702 using the latest API (Not tested on every OS, yet)

Former-commit-id: fb98f86f2a602d543ca1abb5281a30af96462c11
This commit is contained in:
kataras
2017-08-02 21:18:37 +03:00
parent 6fb90cfdb4
commit d08c8aa1d6
2 changed files with 29 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import (
"encoding/gob"
"time"
"github.com/kataras/golog"
"github.com/kataras/iris/sessions/sessiondb/redis/service"
)
@@ -31,12 +32,8 @@ func (d *Database) Load(sid string) (datas map[string]interface{}, expireDate *t
d.redis.Connect()
_, err := d.redis.PingPong()
if err != nil {
if err != nil {
// don't use to get the logger, just prin these to the console... atm
///TODO: Find a way to use the iris' defined logger via an optional interface to Database.
// println("Redis Connection error on Connect: " + err.Error())
// println("But don't panic, auto-switching to memory store right now!")
}
golog.Errorf("redis database error on connect: %v", err)
return
}
}