Replace HPUT with HSET

HPUT is not a Redis command
This commit is contained in:
Peter Stuifzand 2019-08-17 22:07:53 +02:00
parent a684c0c6af
commit 53b4e748c3
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -191,7 +191,7 @@ func (h *hubIncomingBackend) Feeds() ([]Feed, error) {
parts := strings.Split(feedKey, ":") parts := strings.Split(feedKey, ":")
if len(parts) == 2 { if len(parts) == 2 {
feed.ID, _ = strconv.ParseInt(parts[1], 10, 64) feed.ID, _ = strconv.ParseInt(parts[1], 10, 64)
_, err = conn.Do("HPUT", feedKey, "id", feed.ID) _, err = conn.Do("HSET", feedKey, "id", feed.ID)
if err != nil { if err != nil {
log.Printf("could not save id for %s: %v", feedKey, err) log.Printf("could not save id for %s: %v", feedKey, err)
} }
@ -208,7 +208,7 @@ func (h *hubIncomingBackend) Feeds() ([]Feed, error) {
} }
feed.Callback = fmt.Sprintf("%s/incoming/%d", h.baseURL, feed.ID) feed.Callback = fmt.Sprintf("%s/incoming/%d", h.baseURL, feed.ID)
_, err = conn.Do("HPUT", feedKey, "callback", feed.Callback) _, err = conn.Do("HSET", feedKey, "callback", feed.Callback)
if err != nil { if err != nil {
log.Printf("could not save id for %s: %v", feedKey, err) log.Printf("could not save id for %s: %v", feedKey, err)
} }