This commit is contained in:
aozhiwei 2023-12-12 11:07:56 +08:00
parent d3769612a6
commit a84e630ac9
2 changed files with 9 additions and 6 deletions

View File

@ -50,8 +50,8 @@ func (this *SeasonRankMgr) CalcRanking() {
func (this *SeasonRankMgr) goGetUsersRecords() {
userData := make(map[int64]*userDb)
var lastIdx int64 = 0
task := f5.NewTask(
func (task *f5.Task) {
f5.NewAsyncTask(
func (task *f5.AsyncTask) {
sql := fmt.Sprintf("SELECT * FROM t_user WHERE idx > %d AND score > %d LIMIT %d",
lastIdx,
constant.BASE_SCORE,
@ -82,13 +82,16 @@ func (this *SeasonRankMgr) goGetUsersRecords() {
}
if rows.NumOfReaded() <= 0 {
task.SetSucc()
} else {
task.Continue()
}
},
)
}).OnSucc(
func (task* f5.AsyncTask) {
}).OnFail(
func (task* f5.AsyncTask) {
})
if task.IsSucc() {
}
}
func (this *SeasonRankMgr) pushRankingResult() {

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit 003e5247c7c3d299352b72bdf6b0d620bf9bd453
Subproject commit b6f20e6837ac50d25fd84c1985e8c92f669f27a6