add debug test code for redis binary store
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
206dda0761
commit
6511ff6280
@ -2,6 +2,7 @@ package server
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -17,6 +18,11 @@ func (r *RedisRouter) CreateInvitation(invitation []byte, timeout int, password
|
|||||||
if len(password) > 0 {
|
if len(password) > 0 {
|
||||||
r.Client.Set("mwpw:"+id, password, 0) //, time.Duration(timeout*1000000))
|
r.Client.Set("mwpw:"+id, password, 0) //, time.Duration(timeout*1000000))
|
||||||
}
|
}
|
||||||
|
mwiv, err := r.Client.Get("mwiv:" + id).Result()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
}
|
||||||
|
fmt.Println(len([]byte(mwiv)), len(invitation))
|
||||||
return id, time.Now().Add(time.Duration(timeout * 1000000)).UTC()
|
return id, time.Now().Add(time.Duration(timeout * 1000000)).UTC()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user