mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
using bettr import for redis
This commit is contained in:
@@ -20,13 +20,13 @@ package timespans
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/simonz05/godis"
|
||||
"github.com/simonz05/godis/redis"
|
||||
"time"
|
||||
)
|
||||
|
||||
type RedisStorage struct {
|
||||
dbNb int
|
||||
db *godis.Client
|
||||
db *redis.Client
|
||||
ms Marshaler
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func NewRedisStorage(address string, db int, pass string) (DataStorage, error) {
|
||||
if address != "" {
|
||||
address = "tcp:" + address
|
||||
}
|
||||
ndb := godis.New(address, db, pass)
|
||||
ndb := redis.New(address, db, pass)
|
||||
ms := new(MyMarshaler)
|
||||
return &RedisStorage{db: ndb, dbNb: db, ms: ms}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user