sql version => test the case of online
This commit is contained in:
parent
9e3850805f
commit
962c5b36b6
|
@ -59,8 +59,9 @@ 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:
|
||||
|
||||
|
@ -69,6 +70,7 @@ func collectCopyCountLiveAnchors(cxt *WorkerContext) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
ps.Wait(time.Second * 5)
|
||||
|
|
Loading…
Reference in New Issue
Block a user