func (d *dataAccess) BackupLastInfos(m map[string]map[string]*LastInfo) error { conn := d.Get() defer conn.Close() dat, err := util.MarshalGzipJson(m) if err != nil { return slog.Wrap(err) } _, err = conn.Do("SET", "search:last", dat) return slog.Wrap(err) }
func (d *dataAccess) BackupLastInfos(m map[string]map[string]*LastInfo) error { defer collect.StartTimer("redis", opentsdb.TagSet{"op": "BackupLast"})() conn := d.GetConnection() defer conn.Close() dat, err := util.MarshalGzipJson(m) if err != nil { return slog.Wrap(err) } _, err = conn.Do("SET", "search:last", dat) return slog.Wrap(err) }