sql version => test the case of online
This commit is contained in:
parent
9e3850805f
commit
962c5b36b6
14
collect.go
14
collect.go
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user