sql version => test the case of online

This commit is contained in:
eson 2020-12-15 16:58:38 +08:00
parent 9e3850805f
commit 962c5b36b6

View File

@ -59,13 +59,15 @@ func collectCopyCountLiveAnchors(cxt *WorkerContext) {
}
c.CountMap = string(data)
err = T.CountLiveAnchors.Create(c).Error
insertsql := fmt.Sprintf("insert ignore into %s(uid, is_counted, count_map, create_at) values(?,?,?,?)", Tables.CountLiveAnchors)
_, err = db.Exec(insertsql, c.UID, c.IsCounted, c.CountMap, c.CreateAt)
if err != nil {
switch merr := err.(*mysql.MySQLError); merr.Number {
case 1062:
switch merr := err.(*mysql.MySQLError); merr.Number {
case 1062:
default:
log.Println(merr)
default:
log.Println(merr)
}
}
}
}