Beispiel #1
0
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)
}
Beispiel #2
0
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)
}